Products

Create a new product for an existing order.

post/orders/{id}/line_items

Request

Path parameters

idstring required
Example:6307a60c41de27127515a575

Identifier of the resource

Headers

Accept-Language'es' | 'en'

Use for knowing which language to use

X-Child-Company-Idstring

In the case of a holding company, the company id of the child company to which will process the request.

Request body

antifraud_infoobject
brandstring

The brand of the item.

descriptionstring

Short description of the item

metadataobject

It is a key/value hash that can hold custom fields. Maximum 100 elements. Values must be scalar (string of at most 249 characters, integer, number or boolean); nested objects and arrays are not supported.

namestring required

The name of the item. It will be displayed in the order.

quantityinteger required

The quantity of the item in the order.

skustring

The stock keeping unit for the item. It is used to identify the item in the order.

tagsstring[]

List of tags for the item. It is used to identify the item in the order.

unit_priceinteger required

The price of the item in cents.

Example request

{
  "antifraud_info": {
    "key": "value"
  },
  "brand": "Cohiba",
  "description": "Imported From Mex.",
  "metadata": {
    "key": "value"
  },
  "name": "Box of Cohiba S1s",
  "quantity": 1,
  "sku": "XYZ12345",
  "tags": [
    "food",
    "mexican food"
  ],
  "unit_price": 20000
}

Response

successful

antifraud_infoobject
brandstring

The brand of the item.

descriptionstring

Short description of the item

metadataobject

It is a key/value hash that can hold custom fields. Maximum 100 elements. Values must be scalar (string of at most 249 characters, integer, number or boolean); nested objects and arrays are not supported.

namestring required

The name of the item. It will be displayed in the order.

quantityinteger required

The quantity of the item in the order.

skustring

The stock keeping unit for the item. It is used to identify the item in the order.

tagsstring[]

List of tags for the item. It is used to identify the item in the order.

unit_priceinteger required

The price of the item in cents.

idstring
objectstring
parent_idstring

Example response

{
  "antifraud_info": {
    "key": "value"
  },
  "brand": "Cohiba",
  "description": "Imported From Mex.",
  "metadata": {
    "key": "value"
  },
  "name": "Box of Cohiba S1s",
  "quantity": 1,
  "sku": "XYZ12345",
  "tags": [
    "food",
    "mexican food"
  ],
  "unit_price": 20000
}

Changes

    • breaking

      the request property's maxLength was decreased to 249

    • breaking

      the request property's minItems was increased to 1

    • breaking

      the request property's minLength was increased from 0 to 2

    • breaking

      the request property's minLength was increased from 0 to 3

    • breaking

      the request property's minLength was increased from 0 to 3

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the / request property's minLength was increased from 0 to 2

    • warning

      the request property's maxLength was set to 249

    • warning

      the request property's maxLength was set to 249

    • warning

      the request property's maxLength was set to 249

    • warning

      the / request property's maxLength was set to 249