openapi: 3.1.0 info: title: Commerce Layer addresses line_items API version: 7.10.1 contact: name: API Support url: https://commercelayer.io email: support@commercelayer.io description: Headless Commerce for Global Brands. servers: - url: https://{your_organization_slug}.commercelayer.io/api description: API - url: https://core.commercelayer.io/users/sign_in description: Sign in - url: https://docs.commercelayer.io/api description: API reference security: - bearerAuth: [] tags: - name: line_items description: resource type paths: /line_item_options/{lineItemOptionId}/line_item: get: operationId: GET/lineItemOptionId/line_item summary: Retrieve the line item associated to the line item option description: Retrieve the line item associated to the line item option tags: - line_items parameters: - name: lineItemOptionId in: path schema: type: string required: true description: The resource's id responses: '200': description: The line_item associated to the line item option /line_items: get: operationId: GET/line_items summary: List all line items description: List all line items tags: - line_items responses: '200': description: A list of line item objects content: application/vnd.api+json: schema: $ref: '#/components/schemas/lineItemResponseList' post: operationId: POST/line_items summary: Create a line item description: Create a line item tags: - line_items requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/lineItemCreate' responses: '201': description: The created line item object content: application/vnd.api+json: schema: $ref: '#/components/schemas/lineItemResponse' /line_items/{lineItemId}: get: operationId: GET/line_items/lineItemId summary: Retrieve a line item description: Retrieve a line item tags: - line_items parameters: - name: lineItemId in: path schema: type: string required: true description: The resource's id responses: '200': description: The line item object content: application/vnd.api+json: schema: $ref: '#/components/schemas/lineItemResponse' patch: operationId: PATCH/line_items/lineItemId summary: Update a line item description: Update a line item tags: - line_items parameters: - name: lineItemId in: path schema: type: string required: true description: The resource's id requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/lineItemUpdate' responses: '200': description: The updated line item object content: application/vnd.api+json: schema: $ref: '#/components/schemas/lineItemResponse' delete: operationId: DELETE/line_items/lineItemId summary: Delete a line item description: Delete a line item tags: - line_items parameters: - name: lineItemId in: path schema: type: string required: true description: The resource's id responses: '204': description: No content /order_subscription_items/{orderSubscriptionItemId}/source_line_item: get: operationId: GET/orderSubscriptionItemId/source_line_item summary: Retrieve the source line item associated to the order subscription item description: Retrieve the source line item associated to the order subscription item tags: - line_items parameters: - name: orderSubscriptionItemId in: path schema: type: string required: true description: The resource's id responses: '200': description: The source_line_item associated to the order subscription item /orders/{orderId}/line_items: get: operationId: GET/orderId/line_items summary: Retrieve the line items associated to the order description: Retrieve the line items associated to the order tags: - line_items parameters: - name: orderId in: path schema: type: string required: true description: The resource's id responses: '200': description: The line_items associated to the order /return_line_items/{returnLineItemId}/line_item: get: operationId: GET/returnLineItemId/line_item summary: Retrieve the line item associated to the return line item description: Retrieve the line item associated to the return line item tags: - line_items parameters: - name: returnLineItemId in: path schema: type: string required: true description: The resource's id responses: '200': description: The line_item associated to the return line item /shipments/{shipmentId}/line_items: get: operationId: GET/shipmentId/line_items summary: Retrieve the line items associated to the shipment description: Retrieve the line items associated to the shipment tags: - line_items parameters: - name: shipmentId in: path schema: type: string required: true description: The resource's id responses: '200': description: The line_items associated to the shipment /stock_line_items/{stockLineItemId}/line_item: get: operationId: GET/stockLineItemId/line_item summary: Retrieve the line item associated to the stock line item description: Retrieve the line item associated to the stock line item tags: - line_items parameters: - name: stockLineItemId in: path schema: type: string required: true description: The resource's id responses: '200': description: The line_item associated to the stock line item /stock_reservations/{stockReservationId}/line_item: get: operationId: GET/stockReservationId/line_item summary: Retrieve the line item associated to the stock reservation description: Retrieve the line item associated to the stock reservation tags: - line_items parameters: - name: stockReservationId in: path schema: type: string required: true description: The resource's id responses: '200': description: The line_item associated to the stock reservation /stock_transfers/{stockTransferId}/line_item: get: operationId: GET/stockTransferId/line_item summary: Retrieve the line item associated to the stock transfer description: Retrieve the line item associated to the stock transfer tags: - line_items parameters: - name: stockTransferId in: path schema: type: string required: true description: The resource's id responses: '200': description: The line_item associated to the stock transfer components: schemas: lineItemUpdate: required: - data type: object properties: data: type: object required: - type - id - attributes properties: type: type: string description: The resource's type enum: - line_items id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attributes: type: object properties: sku_code: type: string description: The code of the associated SKU. example: TSHIRTMM000000FFFFFFXLXX nullable: true bundle_code: type: string description: The code of the associated bundle. example: BUNDLEMM000000FFFFFFXLXX nullable: true quantity: type: integer description: The line item quantity. example: 4 nullable: false _external_price: type: boolean description: When creating or updating a new line item, set this attribute to '1' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to '0'. example: true nullable: false _reserve_stock: type: boolean description: Send this attribute if you want to reserve the stock for the line item's SKUs quantity. Stock reservations expiration depends on the inventory model's cutoff. When used on update the existing active stock reservations are renewed. Cannot be passed by sales channels. example: true nullable: false _reset_restocked_quantity: type: boolean description: Send this attribute if you want to reset the quantity restocked by a return or by an order/shipment cancel. This will allow for multiple returns, albeit you need to adjust the stock manually. Cannot be passed by sales channels. example: true nullable: false unit_amount_cents: type: integer description: The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels. example: 10000 nullable: true compare_at_amount_cents: type: integer description: The compared price amount, in cents. Useful to display a percentage discount. example: 13000 nullable: true options_amount_cents: type: integer description: The options amount of the line item, in cents. Cannot be passed by sales channels. example: 1000 nullable: true name: type: string description: The name of the line item. When blank, it gets populated with the name of the associated item (if present). example: Men's Black T-shirt with White Logo (XL) nullable: true image_url: type: string description: The image_url of the line item. When blank, it gets populated with the image_url of the associated item (if present, SKU only). example: https://img.yourdomain.com/skus/xYZkjABcde.png nullable: true frequency: type: string description: The frequency which generates a subscription. Must be supported by existing associated subscription_model. example: monthly nullable: true _reset_circuit: type: boolean description: Send this attribute if you want to reset the circuit breaker associated to this resource to 'closed' state and zero failures count. Cannot be passed by sales channels. example: true nullable: false _add_tags: type: string description: Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels. _remove_tags: type: string description: Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels. reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: tags: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN lineItemCreate: required: - data type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - line_items attributes: type: object properties: sku_code: type: string description: The code of the associated SKU. example: TSHIRTMM000000FFFFFFXLXX bundle_code: type: string description: The code of the associated bundle. example: BUNDLEMM000000FFFFFFXLXX quantity: type: integer description: The line item quantity. example: 4 _external_price: type: boolean description: When creating or updating a new line item, set this attribute to '1' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to '0'. example: true _update_quantity: type: boolean description: When creating a new line item, set this attribute to '1' if you want to update the line item quantity (if present) instead of creating a new line item for the same SKU. example: true _reserve_stock: type: boolean description: Send this attribute if you want to reserve the stock for the line item's SKUs quantity. Stock reservations expiration depends on the inventory model's cutoff. When used on update the existing active stock reservations are renewed. Cannot be passed by sales channels. example: true _reset_restocked_quantity: type: boolean description: Send this attribute if you want to reset the quantity restocked by a return or by an order/shipment cancel. This will allow for multiple returns, albeit you need to adjust the stock manually. Cannot be passed by sales channels. example: true unit_amount_cents: type: integer description: The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels. example: 10000 compare_at_amount_cents: type: integer description: The compared price amount, in cents. Useful to display a percentage discount. example: 13000 name: type: string description: The name of the line item. When blank, it gets populated with the name of the associated item (if present). example: Men's Black T-shirt with White Logo (XL) image_url: type: string description: The image_url of the line item. When blank, it gets populated with the image_url of the associated item (if present, SKU only). example: https://img.yourdomain.com/skus/xYZkjABcde.png item_type: type: string description: The type of the associated item. One of 'skus', 'bundles', 'gift_cards', 'shipments', 'payment_methods', 'adjustments', 'discount_engine_items', 'percentage_discount_promotions', 'free_shipping_promotions', 'buy_x_pay_y_promotions', 'free_gift_promotions', 'fixed_price_promotions', 'external_promotions', 'fixed_amount_promotions', or 'flex_promotions'. example: skus enum: - skus - bundles - gift_cards - shipments - payment_methods - adjustments - discount_engine_items - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions frequency: type: string description: The frequency which generates a subscription. Must be supported by existing associated subscription_model. example: monthly reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar required: - quantity relationships: type: object properties: order: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - orders id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN item: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - skus - bundles - gift_cards - shipments - payment_methods - adjustments - discount_engine_items - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN oneOf: - $ref: '#/components/schemas/sku' - $ref: '#/components/schemas/bundle' - $ref: '#/components/schemas/giftCard' - $ref: '#/components/schemas/shipment' - $ref: '#/components/schemas/paymentMethod' - $ref: '#/components/schemas/adjustment' - $ref: '#/components/schemas/discountEngineItem' - $ref: '#/components/schemas/percentageDiscountPromotion' - $ref: '#/components/schemas/freeShippingPromotion' - $ref: '#/components/schemas/buyXPayYPromotion' - $ref: '#/components/schemas/freeGiftPromotion' - $ref: '#/components/schemas/fixedPricePromotion' - $ref: '#/components/schemas/externalPromotion' - $ref: '#/components/schemas/fixedAmountPromotion' - $ref: '#/components/schemas/flexPromotion' tags: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN required: - order lineItemResponse: type: object properties: data: type: object properties: id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN type: type: string description: The resource's type enum: - line_items links: type: object properties: self: type: string description: URL attributes: $ref: '#/components/schemas/lineItem/properties/data/properties/attributes' relationships: type: object properties: order: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - order id: type: string description: The resource ID item: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - item id: type: string description: The resource ID sku: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - sku id: type: string description: The resource ID bundle: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - bundle id: type: string description: The resource ID adjustment: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - adjustment id: type: string description: The resource ID gift_card: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - gift_card id: type: string description: The resource ID shipment: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - shipment id: type: string description: The resource ID payment_method: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - payment_method id: type: string description: The resource ID line_item_options: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - line_item_options id: type: string description: The resource ID return_line_items: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - return_line_items id: type: string description: The resource ID stock_reservations: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - stock_reservations id: type: string description: The resource ID stock_line_items: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - stock_line_items id: type: string description: The resource ID stock_transfers: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - stock_transfers id: type: string description: The resource ID notifications: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - notifications id: type: string description: The resource ID events: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: The resource ID tags: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: The resource ID event_stores: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: The resource ID lineItemResponseList: type: object properties: data: type: array items: $ref: '#/components/schemas/lineItemResponse/properties/data' lineItem: properties: data: properties: attributes: type: object properties: sku_code: type: string description: The code of the associated SKU. example: TSHIRTMM000000FFFFFFXLXX nullable: true bundle_code: type: string description: The code of the associated bundle. example: BUNDLEMM000000FFFFFFXLXX nullable: true quantity: type: integer description: The line item quantity. example: 4 nullable: false _external_price: type: boolean description: When creating or updating a new line item, set this attribute to '1' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to '0'. example: true nullable: true currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the order's market. example: EUR nullable: true unit_amount_cents: type: integer description: The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels. example: 10000 nullable: true unit_amount_float: type: number description: The unit amount of the line item, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce. example: 100.0 nullable: true formatted_unit_amount: type: string description: The unit amount of the line item, formatted. This can be useful to display the amount with currency in you views. example: €100,00 nullable: true compare_at_amount_cents: type: integer description: The compared price amount, in cents. Useful to display a percentage discount. example: 13000 nullable: true compare_at_amount_float: type: number description: The compared price amount, float. example: 130.0 nullable: true formatted_compare_at_amount: type: string description: The compared price amount, formatted. example: €130,00 nullable: true options_amount_cents: type: integer description: The options amount of the line item, in cents. Cannot be passed by sales channels. example: 1000 nullable: true options_amount_float: type: number description: The options amount of the line item, float. example: 10.0 nullable: true formatted_options_amount: type: string description: The options amount of the line item, formatted. example: €10,00 nullable: true discount_cents: type: integer description: The discount applied to the line item, in cents. When you apply a discount to an order, this is automatically calculated basing on the line item total_amount_cents value. example: -1000 nullable: true discount_float: type: number description: The discount applied to the line item, float. When you apply a discount to an order, this is automatically calculated basing on the line item total_amount_cents value. example: 10.0 nullable: true formatted_discount: type: string description: The discount applied to the line item, fromatted. When you apply a discount to an order, this is automatically calculated basing on the line item total_amount_cents value. example: €10,00 nullable: true total_amount_cents: type: integer description: Calculated as unit amount x quantity + options amount, in cents. example: 18800 nullable: true total_amount_float: type: number description: Calculated as unit amount x quantity + options amount, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce. example: 188.0 nullable: false formatted_total_amount: type: string description: Calculated as unit amount x quantity + options amount, formatted. This can be useful to display the amount with currency in you views. example: €188,00 nullable: true tax_amount_cents: type: integer description: The collected tax amount, otherwise calculated as total amount cents - discount cent * tax rate, in cents. example: 1880 nullable: true tax_amount_float: type: number description: The collected tax amount, otherwise calculated as total amount cents - discount cent * tax rate, float. example: 18.8 nullable: false formatted_tax_amount: type: string description: The collected tax amount, otherwise calculated as total amount cents - discount cent * tax rate, formatted. example: €18,80 nullable: true name: type: string description: The name of the line item. When blank, it gets populated with the name of the associated item (if present). example: Men's Black T-shirt with White Logo (XL) nullable: true image_url: type: string description: The image_url of the line item. When blank, it gets populated with the image_url of the associated item (if present, SKU only). example: https://img.yourdomain.com/skus/xYZkjABcde.png nullable: true discount_breakdown: type: object description: The discount breakdown for this line item (if calculated). example: '41': name: 10% ALL cents: -900 weight: 0.416 coupon_code: XXXXXXXX nullable: true tax_rate: type: number description: The tax rate for this line item (if calculated). example: 0.22 nullable: true tax_breakdown: type: object description: The tax breakdown for this line item (if calculated). example: id: '1234' city_amount: '0.0' state_amount: 6.6 city_tax_rate: 0.0 county_amount: 2.78 taxable_amount: 139.0 county_tax_rate: 0.02 tax_collectable: 10.08 special_tax_rate: 0.005 combined_tax_rate: 0.0725 city_taxable_amount: 0.0 state_sales_tax_rate: 0.0475 state_taxable_amount: 139.0 county_taxable_amount: 139.0 special_district_amount: 0.7 special_district_taxable_amount: 139.0 nullable: true item_type: type: string description: The type of the associated item. One of 'skus', 'bundles', 'gift_cards', 'shipments', 'payment_methods', 'adjustments', 'discount_engine_items', 'percentage_discount_promotions', 'free_shipping_promotions', 'buy_x_pay_y_promotions', 'free_gift_promotions', 'fixed_price_promotions', 'external_promotions', 'fixed_amount_promotions', or 'flex_promotions'. example: skus nullable: true enum: - skus - bundles - gift_cards - shipments - payment_methods - adjustments - discount_engine_items - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions frequency: type: string description: The frequency which generates a subscription. Must be supported by existing associated subscription_model. example: monthly nullable: true coupon_code: type: string description: The coupon code, if any, used to trigger this promotion line item. null for other line item types or if the promotion line item wasn't triggered by a coupon. example: SUMMERDISCOUNT nullable: true rule_outcomes: type: object description: The rule outcomes. example: [] nullable: true circuit_state: type: string description: The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made. example: closed nullable: true circuit_failure_count: type: integer description: The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback. example: 5 nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true freeShippingPromotion: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - free_shipping_promotions attributes: type: object properties: name: type: string description: The promotion's internal name. example: Personal promotion nullable: false type: type: string description: The promotion's type. example: percentage_discount_promotions nullable: false enum: - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true exclusive: type: boolean description: Indicates if the promotion will be applied exclusively, based on its priority score. example: true nullable: true priority: type: integer description: The priority assigned to the promotion (lower means higher priority). example: 2 nullable: true starts_at: type: string description: The activation date/time of this promotion. example: '2018-01-01T12:00:00.000Z' nullable: false expires_at: type: string description: The expiration date/time of this promotion (must be after starts_at). example: '2018-01-02T12:00:00.000Z' nullable: false total_usage_limit: type: integer description: The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times. example: 5 nullable: true total_usage_count: type: integer description: The number of times this promotion has been applied. example: 2 nullable: true total_usage_reached: type: boolean description: Indicates if the promotion has been applied the total number of allowed times. example: false nullable: true active: type: boolean description: Indicates if the promotion is active (enabled and not expired). example: true nullable: true status: type: string description: The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'. example: pending nullable: true enum: - disabled - expired - pending - active - inactive weight: type: integer description: The weight of the promotion, computed by exclusivity, priority, type and start time. Determines the order of application, higher weight apply first. example: 112 nullable: true coupons_count: type: integer description: The total number of coupons created for this promotion. example: 2 nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN promotion_rules: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN order_amount_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - order_amount_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_list_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupon_codes_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupon_codes_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN custom_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - custom_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_lists id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupons: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupons id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - skus attributes: type: object properties: code: type: string description: The SKU code, that uniquely identifies the SKU within the organization. example: TSHIRTMM000000FFFFFFXLXX nullable: false name: type: string description: The internal name of the SKU. example: Men's Black T-shirt with White Logo (XL) nullable: false description: type: string description: An internal description of the SKU. example: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. nullable: true image_url: type: string description: The URL of an image that represents the SKU. example: https://img.yourdomain.com/skus/xYZkjABcde.png nullable: true pieces_per_pack: type: integer description: The number of pieces that compose the SKU. This is useful to describe sets and bundles. example: 6 nullable: true weight: type: number description: The weight of the SKU. If present, it will be used to calculate the shipping rates. example: 300.0 nullable: true unit_of_weight: type: string description: The unit of weight. One of 'gr', 'oz', or 'lb'. example: gr nullable: true enum: - gr - oz - lb hs_tariff_number: type: string description: The Harmonized System Code used by customs to identify the products shipped across international borders. example: 4901.91.0020 nullable: true do_not_ship: type: boolean description: Indicates if the SKU doesn't generate shipments. example: false nullable: true do_not_track: type: boolean description: Indicates if the SKU doesn't track the stock inventory. example: false nullable: true inventory: type: object description: Aggregated information about the SKU's inventory. Returned only when retrieving a single SKU. example: available: true quantity: 10 levels: - quantity: 4 delivery_lead_times: - shipping_method: name: Standard Shipping reference: null price_amount_cents: 700 free_over_amount_cents: 9900 formatted_price_amount: €7,00 formatted_free_over_amount: €99,00 min: hours: 72 days: 3 max: hours: 120 days: 5 - shipping_method: name: Express Delivery reference: null price_amount_cents: 1200 free_over_amount_cents: null formatted_price_amount: €12,00 formatted_free_over_amount: null min: hours: 48 days: 2 max: hours: 72 days: 3 - quantity: 6 delivery_lead_times: - shipping_method: name: Standard Shipping reference: null price_amount_cents: 700 free_over_amount_cents: 9900 formatted_price_amount: €7,00 formatted_free_over_amount: €99,00 min: hours: 96 days: 4 max: hours: 144 days: 6 - shipping_method: name: Express Delivery reference: null price_amount_cents: 1200 free_over_amount_cents: null formatted_price_amount: €12,00 formatted_free_over_amount: null min: hours: 72 days: 3 max: hours: 96 days: 4 nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true jwt_custom_claim: type: object description: The custom_claim attached to the current JWT (if any). example: {} nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: shipping_category: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - shipping_categories id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN prices: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - prices id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN stock_items: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_items id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN stock_reservations: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_reservations id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN delivery_lead_times: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - delivery_lead_times id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_options: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_options id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list_items: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_list_items id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_lists: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_lists id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN links: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - links id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN jwt_customer: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - customers id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN jwt_markets: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN jwt_stock_locations: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_locations id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN giftCard: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - gift_cards attributes: type: object properties: status: type: string description: The gift card status. One of 'draft' (default), 'inactive', 'active', or 'redeemed'. example: draft nullable: false enum: - draft - inactive - active - redeemed code: type: string description: The gift card code UUID. If not set, it's automatically generated. example: 32db311a-75d9-4c17-9e34-2be220137ad6 nullable: true currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true initial_balance_cents: type: integer description: The gift card initial balance, in cents. example: 15000 nullable: false initial_balance_float: type: number description: The gift card initial balance, float. example: 150.0 nullable: false formatted_initial_balance: type: string description: The gift card initial balance, formatted. example: €150,00 nullable: false balance_cents: type: integer description: The gift card balance, in cents. example: 15000 nullable: false balance_float: type: number description: The gift card balance, float. example: 150.0 nullable: false formatted_balance: type: string description: The gift card balance, formatted. example: €150,00 nullable: false balance_max_cents: type: integer description: The gift card balance max, in cents. example: 100000 nullable: true balance_max_float: type: number description: The gift card balance max, float. example: 1000.0 nullable: true formatted_balance_max: type: string description: The gift card balance max, formatted. example: €1000,00 nullable: true balance_log: type: array description: The gift card balance log. Tracks all the gift card transactions. example: - datetime: '2019-12-23T12:00:00.000Z' balance_change_cents: -10000 - datetime: '2020-02-01T12:00:00.000Z' balance_change_cents: 5000 nullable: false items: type: object usage_log: type: object description: The gift card usage log. Tracks all the gift card usage actions by orders. example: eNoKkhmbNp: - action: use amount_cents: -1000 balance_cents: 4000 order_number: '11111' datetime: '2020-02-01T12:00:00.000Z' nullable: false single_use: type: boolean description: Indicates if the gift card can be used only one. example: false nullable: true rechargeable: type: boolean description: Indicates if the gift card can be recharged. example: true nullable: true distribute_discount: type: boolean description: Indicates if redeemed gift card amount is distributed for tax calculation. example: true nullable: true image_url: type: string description: The URL of an image that represents the gift card. example: https://img.yourdomain.com/gift_cards/32db311a.png nullable: true expires_at: type: string description: Time at which the gift card will expire. example: '2018-01-01T12:00:00.000Z' nullable: true recipient_email: type: string description: The email address of the associated recipient. When creating or updating a gift card, this is a shortcut to find or create the associated recipient by email. example: john@example.com nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN gift_card_recipient: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - gift_card_recipients id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN buyXPayYPromotion: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - buy_x_pay_y_promotions attributes: type: object properties: name: type: string description: The promotion's internal name. example: Personal promotion nullable: false type: type: string description: The promotion's type. example: percentage_discount_promotions nullable: false enum: - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true exclusive: type: boolean description: Indicates if the promotion will be applied exclusively, based on its priority score. example: true nullable: true priority: type: integer description: The priority assigned to the promotion (lower means higher priority). example: 2 nullable: true starts_at: type: string description: The activation date/time of this promotion. example: '2018-01-01T12:00:00.000Z' nullable: false expires_at: type: string description: The expiration date/time of this promotion (must be after starts_at). example: '2018-01-02T12:00:00.000Z' nullable: false total_usage_limit: type: integer description: The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times. example: 5 nullable: true total_usage_count: type: integer description: The number of times this promotion has been applied. example: 2 nullable: true total_usage_reached: type: boolean description: Indicates if the promotion has been applied the total number of allowed times. example: false nullable: true active: type: boolean description: Indicates if the promotion is active (enabled and not expired). example: true nullable: true status: type: string description: The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'. example: pending nullable: true enum: - disabled - expired - pending - active - inactive weight: type: integer description: The weight of the promotion, computed by exclusivity, priority, type and start time. Determines the order of application, higher weight apply first. example: 112 nullable: true coupons_count: type: integer description: The total number of coupons created for this promotion. example: 2 nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true x: type: integer description: The quantity which defines the threshold for free items (works by multiple of x). example: 3 nullable: false y: type: integer description: The quantity which defines how many items you get for free, with the formula x-y. example: 2 nullable: false cheapest_free: type: boolean description: Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting. example: true nullable: true relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN promotion_rules: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN order_amount_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - order_amount_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_list_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupon_codes_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupon_codes_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN custom_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - custom_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_lists id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupons: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupons id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN skus: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - skus id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN paymentMethod: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - payment_methods attributes: type: object properties: name: type: string description: The payment method's internal name. example: Stripe Payment nullable: true payment_source_type: type: string description: The payment source type. One of 'adyen_payments', 'axerve_payments', 'braintree_payments', 'checkout_com_payments', 'external_payments', 'klarna_payments', 'paypal_payments', 'satispay_payments', 'stripe_payments', or 'wire_transfers'. example: stripe_payments nullable: false enum: - adyen_payments - axerve_payments - braintree_payments - checkout_com_payments - external_payments - klarna_payments - paypal_payments - satispay_payments - stripe_payments - wire_transfers currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true moto: type: boolean description: Send this attribute if you want to mark the payment as MOTO, must be supported by payment gateway. example: false nullable: true require_capture: type: boolean description: Send this attribute if you want to require the payment capture before fulfillment. example: true nullable: true auto_place: type: boolean description: Send this attribute if you want to automatically place the order upon authorization performed asynchronously. example: true nullable: true auto_capture: type: boolean description: Send this attribute if you want to automatically capture the payment upon authorization. example: false nullable: true price_amount_cents: type: integer description: The payment method's price, in cents. example: 0 nullable: false price_amount_float: type: number description: The payment method's price, float. example: 0.0 nullable: true formatted_price_amount: type: string description: The payment method's price, formatted. example: €0,00 nullable: true auto_capture_max_amount_cents: type: integer description: Send this attribute if you want to limit automatic capture to orders for which the total amount is equal or less than the specified value, in cents. example: 0 nullable: true auto_capture_max_amount_float: type: number description: The automatic capture max amount, float. example: 0.0 nullable: true formatted_auto_capture_max_amount: type: string description: The automatic capture max amount, formatted. example: €0,00 nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN payment_gateway: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - payment_gateways id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN store: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN flexPromotion: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - flex_promotions attributes: type: object properties: name: type: string description: The promotion's internal name. example: Personal promotion nullable: false type: type: string description: The promotion's type. example: percentage_discount_promotions nullable: false enum: - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions exclusive: type: boolean description: Indicates if the promotion will be applied exclusively, based on its priority score. example: true nullable: true priority: type: integer description: The priority assigned to the promotion (lower means higher priority). example: 2 nullable: true starts_at: type: string description: The activation date/time of this promotion. example: '2018-01-01T12:00:00.000Z' nullable: false expires_at: type: string description: The expiration date/time of this promotion (must be after starts_at). example: '2018-01-02T12:00:00.000Z' nullable: false total_usage_limit: type: integer description: The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times. example: 5 nullable: true total_usage_count: type: integer description: The number of times this promotion has been applied. example: 2 nullable: true active: type: boolean description: Indicates if the promotion is active (enabled and not expired). example: true nullable: true status: type: string description: The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'. example: pending nullable: true enum: - disabled - expired - pending - active - inactive rules: type: object description: The discount rule to be applied. example: {} nullable: false rule_outcomes: type: object description: The rule outcomes. example: [] nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true resource_payload: type: object description: The payload used to evaluate the rules. example: {} nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: coupon_codes_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupon_codes_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupons: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupons id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN percentageDiscountPromotion: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - percentage_discount_promotions attributes: type: object properties: name: type: string description: The promotion's internal name. example: Personal promotion nullable: false type: type: string description: The promotion's type. example: percentage_discount_promotions nullable: false enum: - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true exclusive: type: boolean description: Indicates if the promotion will be applied exclusively, based on its priority score. example: true nullable: true priority: type: integer description: The priority assigned to the promotion (lower means higher priority). example: 2 nullable: true starts_at: type: string description: The activation date/time of this promotion. example: '2018-01-01T12:00:00.000Z' nullable: false expires_at: type: string description: The expiration date/time of this promotion (must be after starts_at). example: '2018-01-02T12:00:00.000Z' nullable: false total_usage_limit: type: integer description: The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times. example: 5 nullable: true total_usage_count: type: integer description: The number of times this promotion has been applied. example: 2 nullable: true total_usage_reached: type: boolean description: Indicates if the promotion has been applied the total number of allowed times. example: false nullable: true active: type: boolean description: Indicates if the promotion is active (enabled and not expired). example: true nullable: true status: type: string description: The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'. example: pending nullable: true enum: - disabled - expired - pending - active - inactive weight: type: integer description: The weight of the promotion, computed by exclusivity, priority, type and start time. Determines the order of application, higher weight apply first. example: 112 nullable: true coupons_count: type: integer description: The total number of coupons created for this promotion. example: 2 nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true percentage: type: integer description: The discount percentage to be applied. example: 10 nullable: false relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN promotion_rules: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN order_amount_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - order_amount_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_list_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupon_codes_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupon_codes_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN custom_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - custom_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_lists id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupons: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupons id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN skus: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - skus id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN shipment: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - shipments attributes: type: object properties: number: type: string description: Unique identifier for the shipment. Cannot be passed by sales channels. example: '#1234/S/001' nullable: false status: type: string description: The shipment status. One of 'draft' (default), 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', 'shipped', or 'delivered'. example: draft nullable: false enum: - draft - upcoming - cancelled - on_hold - picking - packing - ready_to_ship - shipped - delivered currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the associated order. example: EUR nullable: true cost_amount_cents: type: integer description: The cost of this shipment from the selected carrier account, in cents. example: 1000 nullable: true cost_amount_float: type: number description: The cost of this shipment from the selected carrier account, float. example: 10.0 nullable: true formatted_cost_amount: type: string description: The cost of this shipment from the selected carrier account, formatted. example: €10,00 nullable: true skus_count: type: integer description: The total number of SKUs in the shipment's line items. This can be useful to display a preview of the shipment content. example: 2 nullable: true selected_rate_id: type: string description: The selected purchase rate from the available shipping rates. example: rate_f89e4663c3ed47ee94d37763f6d21d54 nullable: true rates: type: array description: The available shipping rates. example: - id: rate_f89e4663c3ed47ee94d37763f6d21d54 rate: '45.59' carrier: DHLExpress service: MedicalExpress nullable: true items: type: object purchase_error_code: type: string description: The shipping rate purchase error code, if any. example: SHIPMENT.POSTAGE.FAILURE nullable: true purchase_error_message: type: string description: The shipping rate purchase error message, if any. example: Account not allowed for this service. nullable: true get_rates_errors: type: array description: Any errors collected when fetching shipping rates. example: - carrier: DHLExpress message: 'to_address.postal_code: Shorter than minimum length 3' type: rate_error nullable: true items: type: object get_rates_started_at: type: string description: Time at which the getting of the shipping rates started. example: '2018-01-01T12:00:00.000Z' nullable: true get_rates_completed_at: type: string description: Time at which the getting of the shipping rates completed. example: '2018-01-01T12:00:00.000Z' nullable: true purchase_started_at: type: string description: Time at which the purchasing of the shipping rate started. example: '2018-01-01T12:00:00.000Z' nullable: true purchase_completed_at: type: string description: Time at which the purchasing of the shipping rate completed. example: '2018-01-01T12:00:00.000Z' nullable: true purchase_failed_at: type: string description: Time at which the purchasing of the shipping rate failed. example: '2018-01-01T12:00:00.000Z' nullable: true on_hold_at: type: string description: Time at which the shipment was put on hold. example: '2018-01-01T12:00:00.000Z' nullable: true picking_at: type: string description: Time at which the shipment was picking. example: '2018-01-01T12:00:00.000Z' nullable: true packing_at: type: string description: Time at which the shipment was packing. example: '2018-01-01T12:00:00.000Z' nullable: true ready_to_ship_at: type: string description: Time at which the shipment was ready to ship. example: '2018-01-01T12:00:00.000Z' nullable: true shipped_at: type: string description: Time at which the shipment was shipped. example: '2018-01-01T12:00:00.000Z' nullable: true delivered_at: type: string description: Time at which the shipment was delivered. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: order: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - orders id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN shipping_category: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - shipping_categories id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN inventory_stock_location: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - inventory_stock_locations id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN stock_location: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_locations id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN origin_address: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - addresses id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN shipping_address: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - addresses id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN shipping_method: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - shipping_methods id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN delivery_lead_time: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - delivery_lead_times id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN pickup: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - pickups id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN stock_line_items: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_line_items id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN stock_transfers: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_transfers id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN line_items: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - line_items id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN available_shipping_methods: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - shipping_methods id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN carrier_accounts: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - carrier_accounts id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN parcels: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - parcels id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN fixedPricePromotion: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - fixed_price_promotions attributes: type: object properties: name: type: string description: The promotion's internal name. example: Personal promotion nullable: false type: type: string description: The promotion's type. example: percentage_discount_promotions nullable: false enum: - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true exclusive: type: boolean description: Indicates if the promotion will be applied exclusively, based on its priority score. example: true nullable: true priority: type: integer description: The priority assigned to the promotion (lower means higher priority). example: 2 nullable: true starts_at: type: string description: The activation date/time of this promotion. example: '2018-01-01T12:00:00.000Z' nullable: false expires_at: type: string description: The expiration date/time of this promotion (must be after starts_at). example: '2018-01-02T12:00:00.000Z' nullable: false total_usage_limit: type: integer description: The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times. example: 5 nullable: true total_usage_count: type: integer description: The number of times this promotion has been applied. example: 2 nullable: true total_usage_reached: type: boolean description: Indicates if the promotion has been applied the total number of allowed times. example: false nullable: true active: type: boolean description: Indicates if the promotion is active (enabled and not expired). example: true nullable: true status: type: string description: The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'. example: pending nullable: true enum: - disabled - expired - pending - active - inactive weight: type: integer description: The weight of the promotion, computed by exclusivity, priority, type and start time. Determines the order of application, higher weight apply first. example: 112 nullable: true coupons_count: type: integer description: The total number of coupons created for this promotion. example: 2 nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true fixed_amount_cents: type: integer description: The price fixed amount to be applied on matching SKUs, in cents. example: 1000 nullable: false fixed_amount_float: type: number description: The discount fixed amount to be applied, float. example: 10.0 nullable: true formatted_fixed_amount: type: string description: The discount fixed amount to be applied, formatted. example: €10,00 nullable: true relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN promotion_rules: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN order_amount_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - order_amount_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_list_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupon_codes_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupon_codes_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN custom_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - custom_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_lists id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupons: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupons id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN skus: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - skus id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN freeGiftPromotion: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - free_gift_promotions attributes: type: object properties: name: type: string description: The promotion's internal name. example: Personal promotion nullable: false type: type: string description: The promotion's type. example: percentage_discount_promotions nullable: false enum: - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true exclusive: type: boolean description: Indicates if the promotion will be applied exclusively, based on its priority score. example: true nullable: true priority: type: integer description: The priority assigned to the promotion (lower means higher priority). example: 2 nullable: true starts_at: type: string description: The activation date/time of this promotion. example: '2018-01-01T12:00:00.000Z' nullable: false expires_at: type: string description: The expiration date/time of this promotion (must be after starts_at). example: '2018-01-02T12:00:00.000Z' nullable: false total_usage_limit: type: integer description: The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times. example: 5 nullable: true total_usage_count: type: integer description: The number of times this promotion has been applied. example: 2 nullable: true total_usage_reached: type: boolean description: Indicates if the promotion has been applied the total number of allowed times. example: false nullable: true active: type: boolean description: Indicates if the promotion is active (enabled and not expired). example: true nullable: true status: type: string description: The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'. example: pending nullable: true enum: - disabled - expired - pending - active - inactive weight: type: integer description: The weight of the promotion, computed by exclusivity, priority, type and start time. Determines the order of application, higher weight apply first. example: 112 nullable: true coupons_count: type: integer description: The total number of coupons created for this promotion. example: 2 nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true max_quantity: type: integer description: The max quantity of free gifts globally applicable by the promotion. example: 3 nullable: true relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN promotion_rules: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN order_amount_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - order_amount_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_list_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupon_codes_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupon_codes_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN custom_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - custom_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_lists id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupons: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupons id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN skus: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - skus id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN bundle: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - bundles attributes: type: object properties: code: type: string description: The bundle code, that uniquely identifies the bundle within the market. example: BUNDMM000000FFFFFFXLXX nullable: false name: type: string description: The internal name of the bundle. example: Men's Black T-shirt (XL) with Black Cap and Socks, all with White Logo nullable: false currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true description: type: string description: An internal description of the bundle. example: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. nullable: true image_url: type: string description: The URL of an image that represents the bundle. example: https://img.yourdomain.com/bundles/xYZkjABcde.png nullable: true do_not_ship: type: boolean description: Indicates if the bundle doesn't generate shipments (all sku_list's SKUs must be do_not_ship). example: false nullable: true do_not_track: type: boolean description: Indicates if the bundle doesn't track the stock inventory (all sku_list's SKUs must be do_not_track). example: false nullable: true price_amount_cents: type: integer description: The bundle price amount for the associated market, in cents. example: 10000 nullable: true price_amount_float: type: number description: The bundle price amount for the associated market, float. example: 100.0 nullable: true formatted_price_amount: type: string description: The bundle price amount for the associated market, formatted. example: €100,00 nullable: true compare_at_amount_cents: type: integer description: The compared price amount, in cents. Useful to display a percentage discount. example: 13000 nullable: true compare_at_amount_float: type: number description: The compared price amount, float. example: 130.0 nullable: true formatted_compare_at_amount: type: string description: The compared price amount, formatted. example: €130,00 nullable: true skus_count: type: integer description: The total number of SKUs in the bundle. example: 2 nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_lists id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN skus: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - skus id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN adjustment: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - adjustments attributes: type: object properties: name: type: string description: The adjustment name. example: Additional service nullable: false currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: false amount_cents: type: integer description: The adjustment amount, in cents. example: 1500 nullable: false amount_float: type: number description: The adjustment amount, float. example: 15.0 nullable: false formatted_amount: type: string description: The adjustment amount, formatted. example: €15,00 nullable: false distribute_discount: type: boolean description: Indicates if negative adjustment amount is distributed for tax calculation. example: true nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN discountEngineItem: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - discount_engine_items attributes: type: object properties: body: type: object description: The body of the external discount engine response. example: foo: bar nullable: false created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: discount_engine: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - discount_engines id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN order: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - orders id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN fixedAmountPromotion: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - fixed_amount_promotions attributes: type: object properties: name: type: string description: The promotion's internal name. example: Personal promotion nullable: false type: type: string description: The promotion's type. example: percentage_discount_promotions nullable: false enum: - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true exclusive: type: boolean description: Indicates if the promotion will be applied exclusively, based on its priority score. example: true nullable: true priority: type: integer description: The priority assigned to the promotion (lower means higher priority). example: 2 nullable: true starts_at: type: string description: The activation date/time of this promotion. example: '2018-01-01T12:00:00.000Z' nullable: false expires_at: type: string description: The expiration date/time of this promotion (must be after starts_at). example: '2018-01-02T12:00:00.000Z' nullable: false total_usage_limit: type: integer description: The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times. example: 5 nullable: true total_usage_count: type: integer description: The number of times this promotion has been applied. example: 2 nullable: true total_usage_reached: type: boolean description: Indicates if the promotion has been applied the total number of allowed times. example: false nullable: true active: type: boolean description: Indicates if the promotion is active (enabled and not expired). example: true nullable: true status: type: string description: The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'. example: pending nullable: true enum: - disabled - expired - pending - active - inactive weight: type: integer description: The weight of the promotion, computed by exclusivity, priority, type and start time. Determines the order of application, higher weight apply first. example: 112 nullable: true coupons_count: type: integer description: The total number of coupons created for this promotion. example: 2 nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true fixed_amount_cents: type: integer description: The discount fixed amount to be applied, in cents. example: 1000 nullable: false fixed_amount_float: type: number description: The discount fixed amount to be applied, float. example: 10.0 nullable: true formatted_fixed_amount: type: string description: The discount fixed amount to be applied, formatted. example: €10,00 nullable: true relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN promotion_rules: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN order_amount_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - order_amount_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_list_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupon_codes_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupon_codes_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN custom_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - custom_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_lists id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupons: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupons id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN skus: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - skus id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN externalPromotion: type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - external_promotions attributes: type: object properties: name: type: string description: The promotion's internal name. example: Personal promotion nullable: false type: type: string description: The promotion's type. example: percentage_discount_promotions nullable: false enum: - percentage_discount_promotions - free_shipping_promotions - buy_x_pay_y_promotions - free_gift_promotions - fixed_price_promotions - external_promotions - fixed_amount_promotions - flex_promotions currency_code: type: string description: The international 3-letter currency code as defined by the ISO 4217 standard. example: EUR nullable: true exclusive: type: boolean description: Indicates if the promotion will be applied exclusively, based on its priority score. example: true nullable: true priority: type: integer description: The priority assigned to the promotion (lower means higher priority). example: 2 nullable: true starts_at: type: string description: The activation date/time of this promotion. example: '2018-01-01T12:00:00.000Z' nullable: false expires_at: type: string description: The expiration date/time of this promotion (must be after starts_at). example: '2018-01-02T12:00:00.000Z' nullable: false total_usage_limit: type: integer description: The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times. example: 5 nullable: true total_usage_count: type: integer description: The number of times this promotion has been applied. example: 2 nullable: true total_usage_reached: type: boolean description: Indicates if the promotion has been applied the total number of allowed times. example: false nullable: true active: type: boolean description: Indicates if the promotion is active (enabled and not expired). example: true nullable: true status: type: string description: The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'. example: pending nullable: true enum: - disabled - expired - pending - active - inactive weight: type: integer description: The weight of the promotion, computed by exclusivity, priority, type and start time. Determines the order of application, higher weight apply first. example: 112 nullable: true coupons_count: type: integer description: The total number of coupons created for this promotion. example: 2 nullable: true disabled_at: type: string description: Time at which this resource was disabled. example: '2018-01-01T12:00:00.000Z' nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true circuit_state: type: string description: The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made. example: closed nullable: true circuit_failure_count: type: integer description: The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback. example: 5 nullable: true shared_secret: type: string description: The shared secret used to sign the external request payload. example: 1c0994cc4e996e8c6ee56a2198f66f3c nullable: false external_includes: type: array description: List of related resources that will be included in the request to the external callback. Please do consult the documentation to check on which resource the includes are related (i.e. the order) and the defaults in case no list is provided. example: - order.line_item_options nullable: true items: type: string promotion_url: type: string description: The URL to the service that will compute the discount. example: https://external_promotion.yourbrand.com nullable: false relationships: type: object properties: market: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN promotion_rules: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN order_amount_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - order_amount_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_list_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupon_codes_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupon_codes_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN custom_promotion_rule: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - custom_promotion_rules id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN sku_list: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - sku_lists id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN coupons: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - coupons id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attachments: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN events: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN tags: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - tags id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN event_stores: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN skus: type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - skus id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT