younifyd
Menu

Create Order

This API helps you to create a new order.

POST/orders

Use it in a workflow

  1. Add a step and choose the WooCommerce connector.
  2. Pick the Create Order action (under Orders).
  3. Fill in the fields below, then reference the result from later steps as {{createOrder.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

idinteger

Unique identifier for the resource.

parent_idinteger

Parent order ID.

numberstring

Order number.

order_keystring

Order key.

created_viastring

Shows where the order was created.

versionstring

Version of WooCommerce which last updated the order.

statusstring

Order status. Options - pending, processing, on-hold, completed, cancelled, refunded, failed, trash and checkout-draft. Default is pending.

currencystring

Currency the order was created with, in ISO format.

One ofAEDAFNALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBRLBSDBTCBTNBWPBYRBYNBZDCADCDFCHFCLPCNYCOPCRCCUCCUPCVECZKDJFDKK

date_createdstring (date-time)

The date the order was created, in the site's timezone.

date_created_gmtstring (date-time)

The date the order was created, as GMT.

date_modifiedstring (date-time)

The date the order was last modified, in the site's timezone.

date_modified_gmtstring (date-time)

The date the order was last modified, as GMT.

discount_totalstring

Total discount amount for the order.

discount_taxstring

Total discount tax amount for the order.

shipping_totalstring

Total shipping amount for the order.

shipping_taxstring

Total shipping tax amount for the order.

cart_taxstring

Sum of line item taxes only.

totalstring

Grand total.

total_taxstring

Sum of all taxes.

prices_include_taxboolean

True the prices included tax during checkout.

customer_idinteger

User ID who owns the order. 0 for guests.

customer_ip_addressstring

Customer's IP address.

customer_user_agentstring

User agent of the customer.

customer_notestring

Note left by customer during checkout.

billingobject
first_namestring

First name.

last_namestring

Last name.

companystring

Company name.

address_1string

Address line 1

address_2string

Address line 2

citystring

City name.

statestring

ISO code or name of the state, province or district.

postcodestring

Postal code.

countrystring

Country code in ISO 3166-1 alpha-2 format.

emailstring

Email address.

phonestring

Phone number.

shippingobject
first_namestring

First name.

last_namestring

Last name.

companystring

Company name.

address_1string

Address line 1

address_2string

Address line 2

citystring

City name.

statestring

ISO code or name of the state, province or district.

postcodestring

Postal code.

countrystring

ISO code of the country.

phonestring

Phone number.

payment_methodstring

Payment method ID.

payment_method_titlestring

Payment method title.

transaction_idstring

Unique transaction ID.

date_paidstring (date-time)

The date the order was paid, in the site's timezone.

date_paid_gmtstring (date-time)

The date the order was paid, as GMT.

date_completedstring (date-time)

The date the order was completed, in the site's timezone.

date_completed_gmtstring (date-time)

The date the order was completed, as GMT.

cart_hashstring

MD5 hash of cart items to ensure orders are not modified.

meta_dataarray<object>

Meta data properties.

idinteger

Meta ID.

keystring

Meta key.

valueobject

Meta value.

display_keystring

Meta key for UI display.

display_valueobject

Meta value for UI display.

line_itemsarray<object>

Line items data.

idinteger

Item ID.

namestring

Product name.

parent_namestring

Parent product name if the product is a variation.

product_idinteger

Product ID.

variation_idinteger

Variation ID, if applicable.

quantityinteger

Quantity ordered.

tax_classstring

Tax class of product.

subtotalstring

Line subtotal (before discounts).

subtotal_taxstring

Line subtotal tax (before discounts).

totalstring

Line total (after discounts).

total_taxstring

Line total tax (after discounts).

taxesarray<object>8 fields

Line taxes.

meta_dataarray<object>5 fields

Meta data properties.

skustring

Product SKU.

pricenumber

Product price.

tax_linesarray<object>

Tax lines data.

idinteger

Item ID.

rate_codestring

Tax rate code.

rate_idstring

Tax rate ID.

labelstring

Tax rate label.

compoundboolean

Whether or not this is a compound tax rate.

tax_totalstring

Tax total (not including shipping taxes).

shipping_tax_totalstring

Shipping tax total.

meta_dataarray<object>5 fields

Meta data properties.

shipping_linesarray<object>

Shipping lines data.

idinteger

Item ID.

method_titlestring

Shipping method name.

method_idstring

Shipping method ID.

instance_idstring

Shipping instance ID.

totalstring

Line total (after discounts).

total_taxstring

Line total tax (after discounts).

taxesarray<object>8 fields

Line taxes.

meta_dataarray<object>5 fields

Meta data properties.

fee_linesarray<object>

Fee lines data.

idinteger

Item ID.

namestring

Fee name.

tax_classstring

Tax class of fee.

tax_statusstring

Tax status of fee. Options taxable and none.

totalstring

Line total (after discounts).

total_taxstring

Line total tax (after discounts).

taxesarray<object>8 fields

Line taxes.

meta_dataarray<object>5 fields

Meta data properties.

coupon_linesarray<object>

Fee lines data.

idinteger

Item ID.

codestring

Coupon code.

discountstring

Discount total.

discount_taxstring

Discount total tax.

meta_dataarray<object>5 fields

Meta data properties.

json
{
  "id": 0,
  "parent_id": 0,
  "number": "string",
  "order_key": "string",
  "created_via": "string",
  "version": "string",
  "status": "string",
  "currency": "AED",
  "date_created": "2025-01-01T00:00:00Z",
  "date_created_gmt": "2025-01-01T00:00:00Z",
  "date_modified": "2025-01-01T00:00:00Z",
  "date_modified_gmt": "2025-01-01T00:00:00Z"
}

Response

Returns 201 with an object. Read it in later steps with {{createOrder.response.data.<field>}}.

idinteger

Unique identifier for the resource.

parent_idinteger

Parent order ID.

numberstring

Order number.

order_keystring

Order key.

created_viastring

Shows where the order was created.

versionstring

Version of WooCommerce which last updated the order.

statusstring

Order status. Options - pending, processing, on-hold, completed, cancelled, refunded, failed, trash and checkout-draft. Default is pending.

currencystring

Currency the order was created with, in ISO format.

One ofAEDAFNALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBRLBSDBTCBTNBWPBYRBYNBZDCADCDFCHFCLPCNYCOPCRCCUCCUPCVECZKDJFDKK

date_createdstring (date-time)

The date the order was created, in the site's timezone.

date_created_gmtstring (date-time)

The date the order was created, as GMT.

date_modifiedstring (date-time)

The date the order was last modified, in the site's timezone.

date_modified_gmtstring (date-time)

The date the order was last modified, as GMT.

discount_totalstring

Total discount amount for the order.

discount_taxstring

Total discount tax amount for the order.

shipping_totalstring

Total shipping amount for the order.

shipping_taxstring

Total shipping tax amount for the order.

cart_taxstring

Sum of line item taxes only.

totalstring

Grand total.

total_taxstring

Sum of all taxes.

prices_include_taxboolean

True the prices included tax during checkout.

customer_idinteger

User ID who owns the order. 0 for guests.

customer_ip_addressstring

Customer's IP address.

customer_user_agentstring

User agent of the customer.

customer_notestring

Note left by customer during checkout.

billingobject
first_namestring

First name.

last_namestring

Last name.

companystring

Company name.

address_1string

Address line 1

address_2string

Address line 2

citystring

City name.

statestring

ISO code or name of the state, province or district.

postcodestring

Postal code.

countrystring

Country code in ISO 3166-1 alpha-2 format.

emailstring

Email address.

phonestring

Phone number.

shippingobject
first_namestring

First name.

last_namestring

Last name.

companystring

Company name.

address_1string

Address line 1

address_2string

Address line 2

citystring

City name.

statestring

ISO code or name of the state, province or district.

postcodestring

Postal code.

countrystring

ISO code of the country.

phonestring

Phone number.

payment_methodstring

Payment method ID.

payment_method_titlestring

Payment method title.

transaction_idstring

Unique transaction ID.

date_paidstring (date-time)

The date the order was paid, in the site's timezone.

date_paid_gmtstring (date-time)

The date the order was paid, as GMT.

date_completedstring (date-time)

The date the order was completed, in the site's timezone.

date_completed_gmtstring (date-time)

The date the order was completed, as GMT.

cart_hashstring

MD5 hash of cart items to ensure orders are not modified.

meta_dataarray<object>

Meta data properties.

idinteger

Meta ID.

keystring

Meta key.

valueobject

Meta value.

display_keystring

Meta key for UI display.

display_valueobject

Meta value for UI display.

line_itemsarray<object>

Line items data.

idinteger

Item ID.

namestring

Product name.

parent_namestring

Parent product name if the product is a variation.

product_idinteger

Product ID.

variation_idinteger

Variation ID, if applicable.

quantityinteger

Quantity ordered.

tax_classstring

Tax class of product.

subtotalstring

Line subtotal (before discounts).

subtotal_taxstring

Line subtotal tax (before discounts).

totalstring

Line total (after discounts).

total_taxstring

Line total tax (after discounts).

taxesarray<object>8 fields

Line taxes.

meta_dataarray<object>5 fields

Meta data properties.

skustring

Product SKU.

pricenumber

Product price.

tax_linesarray<object>

Tax lines data.

idinteger

Item ID.

rate_codestring

Tax rate code.

rate_idstring

Tax rate ID.

labelstring

Tax rate label.

compoundboolean

Whether or not this is a compound tax rate.

tax_totalstring

Tax total (not including shipping taxes).

shipping_tax_totalstring

Shipping tax total.

meta_dataarray<object>5 fields

Meta data properties.

shipping_linesarray<object>

Shipping lines data.

idinteger

Item ID.

method_titlestring

Shipping method name.

method_idstring

Shipping method ID.

instance_idstring

Shipping instance ID.

totalstring

Line total (after discounts).

total_taxstring

Line total tax (after discounts).

taxesarray<object>8 fields

Line taxes.

meta_dataarray<object>5 fields

Meta data properties.

fee_linesarray<object>

Fee lines data.

idinteger

Item ID.

namestring

Fee name.

tax_classstring

Tax class of fee.

tax_statusstring

Tax status of fee. Options taxable and none.

totalstring

Line total (after discounts).

total_taxstring

Line total tax (after discounts).

taxesarray<object>8 fields

Line taxes.

meta_dataarray<object>5 fields

Meta data properties.

coupon_linesarray<object>

Fee lines data.

idinteger

Item ID.

codestring

Coupon code.

discountstring

Discount total.

discount_taxstring

Discount total tax.

meta_dataarray<object>5 fields

Meta data properties.

json
{
  "id": 0,
  "parent_id": 0,
  "number": "string",
  "order_key": "string",
  "created_via": "string",
  "version": "string",
  "status": "string",
  "currency": "AED",
  "date_created": "2025-01-01T00:00:00Z",
  "date_created_gmt": "2025-01-01T00:00:00Z",
  "date_modified": "2025-01-01T00:00:00Z",
  "date_modified_gmt": "2025-01-01T00:00:00Z"
}

Need more? See the WooCommerce guide for connection setup and behaviour shared by every action.

Was this page helpful?