1. Home
  2. Knowledge Base
  3. Developer Articles
  4. JS API
  5. Order (Conversion) Data Object Schema

Order (Conversion) Data Object Schema

This is the schema for the Order data object.

Order Schema

   {
	  "order_id":      "12345", // Required - Integer, String: A unique identifier that your platform can identify the order by. 
	  "number":        "order-5", // Optional - Integer, String: A user-friendly order identifier that appears on the order frontend.
	  "test":          false, // Optional - Boolean: If true, the order will be skipped in certain calculations.
	  "canceled":      false, // Optional - Boolean If true, the order will be ignored from certain calculations.

	  "total":         10.0, // Required - Float
	  "total_usd":     10.0, // Required - Float

	  "created_at":    "2019-03-18T21:01:10+00:00", // (Optional) String (ISO 8601 format DateTime) 
	  "modified_at":   "2019-03-18T21:01:10+00:00", // (Optional) String (ISO 8601 format DateTime)  

	  "source_name":   "web", // (Optional) String

	  "line_items":    [LineItem], // Required - Array<LineItem>
	  "customer": CustomerDataObject // Optional - CustomerDataObject: Information about the customer that placed the order,
	}

LineItem Schema

	   {
		  "name":       "Subscription to Product 123", // Required - String
		  "quantity":   1, // Required - Integer
		  "total":      10.0, // Required - Float
		  "total_usd":  10.0, // Required - Float
      	  "variant_id": "variation1", // (Optional) String: If a variation was particularly selected, then specify it here
		  "product_id": "123", // Optional - String: Either this field or the "product" field most be specified.
		  "product": ProductDataObject // Optional - ProductDataObject: Either this field or the "product_id" field most be specified.
		}

Was this article helpful?

Related Articles