Order Service

This is the documentation for version v1 of the API. Last update on Jul 2, 2021.

Base URL
https://api.emporix.io/order

Calculations

Updates the number of entries in the specific order and recalculates it

Updates the number of entries in the specific order and recalculates it.

Requires scope order.order_update.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Body
  • entryId Required / string
  • deliveredAmount Required / number

    Minimum value is 0.

  • unit string
Responses
  • 200

    Order recalculated successfully

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /{tenant}/salesorders/{orderId}/calculations
$ curl \
 -X POST https://api.emporix.io/order/{tenant}/salesorders/{orderId}/calculations \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -H "saas-token: string" \
 -d '{"entries":[{"entryId":"5c336893a981210009900071","deliveredAmount":10},{"entryId":"5c336893a981210009900072","deliveredAmount":1000,"unit":"GRM"}]}'
Request payload example
# Headers
authorization: string
saas-token: string

# Payload
{
  "entries": [
    {
      "entryId": "5c336893a981210009900071",
      "deliveredAmount": 10
    },
    {
      "entryId": "5c336893a981210009900072",
      "deliveredAmount": 1000,
      "unit": "GRM"
    }
  ]
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}

Orders

Retrieves a list of orders

Retrieves a list of orders (as a customer).

Requires anonymous customer or scope order.history_view for logged in customers.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Query parameters
  • sort string

    The list of comma-separated properties used to sort the results.
    By default, the column values are sorted in ascending order.
    Can either be in the form of fieldName or fieldName:asc,fieldName:desc.
    If you want to sort by localized attributes, you must use the following form:
    fieldName.language or fieldName.language:asc,fieldName.language:desc.

  • pageNumber integer

    The page number to be retrieved where the size of the pages must be specified by the pageSize parameter.
    The number of the first page is 1.

    Minimum value is 1. Default value is 1.

  • pageSize integer

    The number of documents being retrieved on the page.

    Minimum value is 1. Default value is 16.

  • q string

    The simple query criteria based on available fields to limit returned results or a set of modified documents.

Responses
  • 200

    Some server side error occurred.

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server side error occurred.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /{tenant}/orders
$ curl \
 -X GET https://api.emporix.io/order/{tenant}/orders \
 -H "authorization: string" \
 -H "saas-token: string"
Response example (200)
[
  {
    "id": "orderId123456",
    "metadata": {
      "mixins": {
        "additionalCode": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"
      }
    },
    "mixins": {
      "additionalCode": {
        "code": "DFG-334-98330-X"
      }
    },
    "created": "2014-03-31T10:18:21.134Z",
    "completed": "2014-04-15T10:18:21.134Z",
    "lastStatusChange": "2014-04-15T10:18:21.134Z",
    "status": "COMPLETED",
    "siteCode": "Germany",
    "countryCode": "DE",
    "deliveryWindowId": "5d230f973f05e303d5c30dba",
    "entries": [
      {
        "id": "5c13ccdbba93e00008b8d274",
        "amount": 2,
        "orderedAmount": 2,
        "originalAmount": 450,
        "originalPrice": 450,
        "unitPrice": 420,
        "totalPrice": 840,
        "authorizedAmount": 840,
        "link": "https://api.emporix.io/product/saasdev2/products/5c13ccdbba93e00008b8d274",
        "product": {
          "description": "A mug you've always wanted !",
          "name": "Mug",
          "sku": "mug-product",
          "published": true,
          "images": [
            {
              "id": "media123456",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ]
        },
        "variant": {
          "id": "438954845899094",
          "name": "Black Small Mug",
          "code": "mug-black-small",
          "images": [
            {
              "id": "12345678",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ],
          "options": {
            "mug": {
              "color": "black",
              "size": "small"
            }
          },
          "mixins": {
            "additionalVariantCode": {
              "code": "variant code"
            }
          }
        }
      },
      {
        "id": "1234547",
        "amount": 5,
        "unitPrice": 240,
        "totalPrice": 1200,
        "authorizedAmount": 1200,
        "product": {
          "metadata": {
            "mixins": {
              "color": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/color_v1.json"
            }
          },
          "description": "A Shirt you've always wanted !",
          "name": "Shirt",
          "sku": "shirt-product",
          "published": true,
          "images": [
            {
              "id": "media1234567",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ],
          "mixins": {
            "color": {
              "red": 234,
              "green": 231,
              "blue": 123
            }
          }
        },
        "variant": {
          "id": "968954845899234",
          "name": "Black Small T-Shirt",
          "code": "t-shirt-black-small",
          "images": [
            {
              "id": "12345679",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ],
          "options": {
            "tshirt": {
              "color": "black",
              "size": "small"
            }
          },
          "mixins": {
            "additionalVariantCode": {
              "code": "variant code"
            }
          }
        }
      }
    ],
    "discounts": [
      {
        "code": "SUMMER_SALE",
        "name": "Summer Sale 10% off everything",
        "amount": 204,
        "currency": "USD",
        "discountRate": 10,
        "sequenceId": 1,
        "link": {
          "id": "B2TD3JM",
          "type": "y-coupon",
          "url": "https://api.emporix.io/coupon/saasdev2/coupons/ENG2OC"
        }
      }
    ],
    "customer": {
      "id": "C1234567890",
      "title": "Dr.",
      "name": "Example Buyer",
      "firstName": "Example",
      "lastName": "Buyer",
      "email": "noreply@emporix.com",
      "company": "emporix"
    },
    "billingAddress": {
      "contactName": "Example Buyer",
      "street": "Nymphenburger Str.",
      "streetNumber": "86",
      "city": "Munich",
      "state": "Bavaria",
      "country": "Germany",
      "zipCode": "132 45",
      "contactPhone": "+49 1111 222 333"
    },
    "shippingAddress": {
      "contactName": "Joe Smith",
      "companyName": "Cargo Services Airfreight",
      "street": "Cheng Xiang Zhen Guan Tang Lu",
      "streetNumber": "1031",
      "extraLine1": "No. 2058",
      "extraLine2": "Suzhou City",
      "zipCode": "201202",
      "city": "Taicang City",
      "state": "Jiangsu Province",
      "country": "CN",
      "contactPhone": "+86 182 9349 4663",
      "metadata": {
        "mixins": {
          "secondaryContactPhone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
        }
      },
      "mixins": {
        "secondaryContactPhone": {
          "number": "+86 334 0033 9934"
        }
      }
    },
    "subTotalPrice": 1881,
    "totalPrice": 2041,
    "totalAuthorizedAmount": 2041,
    "currency": "USD",
    "payments": [
      {
        "status": "SUCCESS",
        "method": "STRIPE",
        "paymentResponse": "",
        "paidAmount": 2041,
        "currency": "USD"
      }
    ],
    "tax": {
      "total": {
        "amount": 150.0,
        "currency": "USD"
      },
      "lines": [
        {
          "amount": 150.0,
          "currency": "USD",
          "code": "VAT",
          "name": "Regular VAT",
          "rate": 10,
          "taxable": 1500.0,
          "sequenceId": 1,
          "inclusive": false
        }
      ]
    },
    "shipping": {
      "total": {
        "amount": 10.0,
        "currency": "USD"
      },
      "lines": [
        {
          "amount": 10.0,
          "currency": "USD",
          "code": "dhlstd",
          "name": "DHL Standard"
        }
      ]
    },
    "shipments": [
      {
        "trackingNumber": "123987456",
        "carrier": "UPS",
        "shippedDate": "2016-06-25T16:22:52.966Z",
        "expectDeliveryOn": "2016-06-27"
      }
    ]
  },
  {
    "id": "orderId123457",
    "created": "2015-02-11T03:12:33.345Z",
    "status": "CREATED",
    "siteCode": "Germany",
    "countryCode": "DE",
    "deliveryWindowId": "5d230f973f05e303d5c30dba",
    "entries": [
      {
        "metadata": {
          "mixins": {
            "additionalCode": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"
          }
        },
        "id": "5c13ccdbba93e00008b8d274",
        "amount": 1,
        "orderedAmount": 1,
        "originalAmount": 450,
        "originalPrice": 450,
        "unitPrice": 420,
        "totalPrice": 420,
        "authorizedAmount": 420,
        "link": "https://api.emporix.io/product/saasdev2/products/5c13ccdbba93e00008b8d274",
        "product": {
          "description": "A mug you've always wanted !",
          "name": "Mug",
          "sku": "mug-product",
          "published": true,
          "images": [
            {
              "id": "media123456",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ]
        },
        "mixins": {
          "additionalCode": {
            "code": "ABC"
          }
        }
      }
    ],
    "customer": {
      "id": "C1234567890",
      "title": "Dr.",
      "name": "Example Buyer",
      "firstName": "Example",
      "lastName": "Buyer",
      "email": "noreply@emporix.com",
      "company": "emporix",
      "metadata": {
        "mixins": {
          "work_phone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
        }
      },
      "mixins": {
        "work_phone": {
          "number": "+86 334 0033 9934"
        }
      }
    },
    "billingAddress": {
      "contactName": "Example Buyer",
      "street": "Nymphenburger Str.",
      "streetNumber": "86",
      "city": "Munich",
      "state": "Bavaria",
      "country": "DE",
      "zipCode": "132 45",
      "contactPhone": "+49 1111 222 333"
    },
    "shippingAddress": {
      "contactName": "Joe Smith",
      "companyName": "Cargo Services Airfreight",
      "street": "Cheng Xiang Zhen Guan Tang Lu",
      "streetNumber": "1031",
      "extraLine1": "No. 2058",
      "extraLine2": "Suzhou City",
      "zipCode": "201202",
      "city": "Taicang City",
      "state": "Jiangsu Province",
      "country": "CN",
      "contactPhone": "+86 182 9349 4663",
      "metadata": {
        "mixins": {
          "secondaryContactPhone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
        }
      },
      "mixins": {
        "secondaryContactPhone": {
          "number": "+86 334 0033 9934"
        }
      }
    },
    "totalPrice": 420,
    "totalAuthorizedAmount": 420,
    "currency": "USD"
  }
]
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "q",
      "message": "not a valid query",
      "type": "invalid_query_parameter"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Creates an order

Creates an order (as a customer).

Requires scope order.order_post.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 201 string

    The collection resource has been successfully created.

    • Location string

      The Location of the new resource which was created by the request.
      The value consists of a single absolute URI.

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 409 object

    Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server side error occurred.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /{tenant}/orders
$ curl \
 -X POST https://api.emporix.io/order/{tenant}/orders \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -H "saas-token: string" \
 -d '{"metadata":{"mixins":{"additionalCode":"https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"}},"mixins":{"additionalCode":{"code":"DFG-334-98330-X"}},"entries":[{"metadata":{"mixins":{"additionalCode":"https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"}},"id":"5c13ccdbba93e00008b8d274","amount":2,"unitPrice":420,"totalPrice":840,"authorizedAmount":840,"link":"https://api.emporix.io/product/saasdev2/products/5c13ccdbba93e00008b8d274",...}'
Request payload example
# Headers
authorization: string
saas-token: string
Response example (201)
# Headers
Location: string
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (409)
{
  "status": 409,
  "message": "The requested resource could not be created due to server-side validation.",
  "moreInfo": "",
  "type": "conflict_resource"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Root

Retrieves a specific order

Retrieves a specific order, as a merchant.

Requires scope order.order_read.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 200 string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /{tenant}/salesorders/{orderId}
$ curl \
 -X GET https://api.emporix.io/order/{tenant}/salesorders/{orderId} \
 -H "authorization: string" \
 -H "saas-token: string"
Response example (200)
[
  {
    "id": "orderId123456",
    "metadata": {
      "mixins": {
        "additionalCode": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"
      }
    },
    "mixins": {
      "additionalCode": {
        "code": "DFG-334-98330-X"
      }
    },
    "created": "2014-03-31T10:18:21.134Z",
    "completed": "2014-04-15T10:18:21.134Z",
    "status": "COMPLETED",
    "siteCode": "Germany",
    "countryCode": "DE",
    "deliveryWindowId": "5d230f973f05e303d5c30dba",
    "channel": {
      "name": "Pinterest",
      "source": "https://www.pinterest.com/pin/123456"
    },
    "entries": [
      {
        "id": "5c13ccdbba93e00008b8d274",
        "amount": 2,
        "originalAmount": 450,
        "unitPrice": 420,
        "totalPrice": 840,
        "authorizedAmount": 840,
        "link": "https://api.emporix.io/product/saasdev2/products/5c13ccdbba93e00008b8d274",
        "product": {
          "description": "A mug you've always wanted !",
          "name": "Mug",
          "sku": "mug-product",
          "published": true,
          "images": [
            {
              "id": "media123456",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ]
        },
        "variant": {
          "id": "438954845899094",
          "name": "Black Small Mug",
          "code": "mug-black-small",
          "images": [
            {
              "id": "12345678",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ],
          "options": {
            "mug": {
              "color": "black",
              "size": "small"
            }
          },
          "mixins": {
            "additionalVariantCode": {
              "code": "variant code"
            }
          }
        }
      },
      {
        "id": "1234547",
        "amount": 5,
        "originalAmount": 250,
        "unitPrice": 240,
        "totalPrice": 1200,
        "authorizedAmount": 1200,
        "product": {
          "metadata": {
            "mixins": {
              "color": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/color_v1.json"
            }
          },
          "description": "A Shirt you've always wanted !",
          "name": "Shirt",
          "sku": "shirt-product",
          "published": true,
          "images": [
            {
              "id": "media1234567",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ],
          "mixins": {
            "color": {
              "red": 234,
              "green": 231,
              "blue": 123
            }
          }
        },
        "variant": {
          "id": "968954845899234",
          "name": "Black Small T-Shirt",
          "code": "t-shirt-black-small",
          "images": [
            {
              "id": "12345679",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ],
          "options": {
            "tshirt": {
              "color": "black",
              "size": "small"
            }
          },
          "mixins": {
            "additionalVariantCode": {
              "code": "variant code"
            }
          }
        }
      }
    ],
    "discounts": [
      {
        "code": "SUMMER_SALE",
        "name": "Summer Sale 10% off everything",
        "amount": 204,
        "currency": "USD",
        "discountRate": 10,
        "sequenceId": 1,
        "link": {
          "id": "B2TD3JM",
          "type": "y-coupon",
          "url": "https://api.emporix.io/coupon/saasdev2/coupons/ENG2OC"
        }
      }
    ],
    "customer": {
      "id": "C1234567890",
      "title": "Dr.",
      "name": "Example Buyer",
      "firstName": "Example",
      "lastName": "Buyer",
      "email": "noreply@emporix.com",
      "company": "emporix"
    },
    "billingAddress": {
      "contactName": "Example Buyer",
      "street": "Nymphenburger Str.",
      "streetNumber": "86",
      "city": "Munich",
      "state": "Bavaria",
      "country": "Germany",
      "zipCode": "132 45",
      "contactPhone": "+49 1111 222 333"
    },
    "shippingAddress": {
      "contactName": "Joe Smith",
      "companyName": "Cargo Services Airfreight",
      "street": "Cheng Xiang Zhen Guan Tang Lu",
      "streetNumber": "1031",
      "extraLine1": "No. 2058",
      "extraLine2": "Suzhou City",
      "zipCode": "201202",
      "city": "Taicang City",
      "state": "Jiangsu Province",
      "country": "CN",
      "contactPhone": "+86 182 9349 4663",
      "metadata": {
        "mixins": {
          "secondaryContactPhone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
        }
      },
      "mixins": {
        "secondaryContactPhone": {
          "number": "+86 334 0033 9934"
        }
      }
    },
    "subTotalPrice": 1881,
    "totalPrice": 2041,
    "totalAuthorizedAmount": 2041,
    "currency": "USD",
    "payments": [
      {
        "status": "SUCCESS",
        "method": "STRIPE",
        "paymentResponse": "",
        "paidAmount": 2041,
        "currency": "USD"
      }
    ],
    "tax": {
      "total": {
        "amount": 150,
        "currency": "USD"
      },
      "lines": [
        {
          "amount": 150,
          "currency": "USD",
          "code": "VAT",
          "name": "Regular VAT",
          "rate": 10,
          "taxable": 1500,
          "sequenceId": 1,
          "inclusive": false
        }
      ]
    },
    "shipping": {
      "total": {
        "amount": 10,
        "currency": "USD"
      },
      "lines": [
        {
          "amount": 10,
          "currency": "USD",
          "code": "dhlstd",
          "name": "DHL Standard"
        }
      ]
    },
    "shipments": [
      {
        "trackingNumber": "123987456",
        "carrier": "UPS",
        "shippedDate": "2016-06-25T16:22:52.966Z",
        "expectDeliveryOn": "2016-06-27"
      }
    ]
  },
  {
    "id": "orderId123457",
    "created": "2015-02-11T03:12:33.345Z",
    "status": "CREATED",
    "siteCode": "Germany",
    "countryCode": "DE",
    "deliveryWindowId": "5d230f973f05e303d5c30dba",
    "channel": {
      "name": "Twitter",
      "source": "https://twitter.com/emporix/status/707599225782214656"
    },
    "entries": [
      {
        "metadata": {
          "mixins": {
            "additionalCode": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"
          }
        },
        "id": "5c13ccdbba93e00008b8d274",
        "amount": 1,
        "unitPrice": 420,
        "totalPrice": 420,
        "authorizedAmount": 420,
        "link": "https://api.emporix.io/product/saasdev2/products/5c13ccdbba93e00008b8d274",
        "product": {
          "description": "A mug you've always wanted !",
          "name": "Mug",
          "sku": "mug-product",
          "published": true,
          "images": [
            {
              "id": "media123456",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ]
        },
        "mixins": {
          "additionalCode": {
            "code": "ABC"
          }
        }
      }
    ],
    "customer": {
      "id": "C1234567890",
      "title": "Dr.",
      "name": "Example Buyer",
      "firstName": "Example",
      "lastName": "Buyer",
      "email": "noreply@emporix.com",
      "company": "emporix",
      "metadata": {
        "mixins": {
          "work_phone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
        }
      },
      "mixins": {
        "work_phone": {
          "number": "+86 334 0033 9934"
        }
      }
    },
    "billingAddress": {
      "contactName": "Example Buyer",
      "street": "Nymphenburger Str.",
      "streetNumber": "86",
      "city": "Munich",
      "state": "Bavaria",
      "country": "DE",
      "zipCode": "132 45",
      "contactPhone": "+49 1111 222 333"
    },
    "shippingAddress": {
      "contactName": "Joe Smith",
      "companyName": "Cargo Services Airfreight",
      "street": "Cheng Xiang Zhen Guan Tang Lu",
      "streetNumber": "1031",
      "extraLine1": "No. 2058",
      "extraLine2": "Suzhou City",
      "zipCode": "201202",
      "city": "Taicang City",
      "state": "Jiangsu Province",
      "country": "CN",
      "contactPhone": "+86 182 9349 4663",
      "metadata": {
        "mixins": {
          "secondaryContactPhone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
        }
      },
      "mixins": {
        "secondaryContactPhone": {
          "number": "+86 334 0033 9934"
        }
      }
    },
    "totalPrice": 420,
    "totalAuthorizedAmount": 420,
    "currency": "USD"
  }
]
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}

Updates an order with the specified ID

Updates an order with the specified ID.

Requires scope order.order_update.

Deprecated

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 204

    Successful order update

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    Order does not exist

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

PUT /{tenant}/salesorders/{orderId}
$ curl \
 -X PUT https://api.emporix.io/order/{tenant}/salesorders/{orderId} \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -H "saas-token: string" \
 -d '{"metadata":{"mixins":{"additionalCode":"https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"}},"mixins":{"additionalCode":{"code":"DFG-334-98330-X"}},"created":"2014-03-31T10:18:21.134Z","completed":"2014-04-15T10:18:21.134Z","entries":[{"metadata":{"mixins":{"additionalCode":"https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"}},"id":"5c13ccdbba93e00008b8d274","amount":2,"unitPrice":420,"totalPrice":840,"link":"https://api.emporix.io...}'
Request payload example
# Headers
authorization: string
saas-token: string
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Deletes an order with the specified ID

Deletes an order with the specified ID.

Requires scope order.order_delete.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 204

    Successful deletion

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

DELETE /{tenant}/salesorders/{orderId}
$ curl \
 -X DELETE https://api.emporix.io/order/{tenant}/salesorders/{orderId} \
 -H "authorization: string" \
 -H "saas-token: string"
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}

Updates an order with the specified ID

Updates an order with the specified ID.

Requires scope order.order_update.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 204

    Successful order update

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    Order does not exist

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

PATCH /{tenant}/salesorders/{orderId}
$ curl \
 -X PATCH https://api.emporix.io/order/{tenant}/salesorders/{orderId} \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -H "saas-token: string" \
 -d '{"metadata":{"mixins":{"additionalCode":"https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"}},"mixins":{"additionalCode":{"code":"DFG-334-98330-X"}},"created":"2014-03-31T10:18:21.134Z","completed":"2014-04-15T10:18:21.134Z","entries":[{"metadata":{"mixins":{"additionalCode":"https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"}},"id":"5c13ccdbba93e00008b8d274","amount":2,"unitPrice":420,"totalPrice":840,"link":"https://api.emporix.io...}'
Request payload example
# Headers
authorization: string
saas-token: string
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Get details about an order

Get details about an order (as a customer).

Requires anonymous customer or scope order.history_view for logged in customers.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 200 string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 404 object

    Order does not exist

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /{tenant}/orders/{orderId}
$ curl \
 -X GET https://api.emporix.io/order/{tenant}/orders/{orderId} \
 -H "authorization: string" \
 -H "saas-token: string"
Response example (200)
{
  "id": "orderId123456",
  "metadata": {
    "mixins": {
      "additionalCode": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"
    }
  },
  "mixins": {
    "additionalCode": {
      "code": "DFG-334-98330-X"
    }
  },
  "created": "2014-03-31T10:18:21.134Z",
  "completed": "2014-04-15T10:18:21.134Z",
  "lastStatusChange": "2014-04-15T10:18:21.134Z",
  "status": "COMPLETED",
  "entries": [
    {
      "metadata": {
        "mixins": {
          "additionalCode": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"
        }
      },
      "id": "5c13ccdbba93e00008b8d274",
      "amount": 2,
      "orderedAmount": 2,
      "originalAmount": 450,
      "originalPrice": 450,
      "unitPrice": 420,
      "totalPrice": 840,
      "authorizedAmount": 840,
      "link": "https://api.emporix.io/product/saasdev2/products/5c13ccdbba93e00008b8d274",
      "product": {
        "description": "A mug you've always wanted !",
        "name": "Mug",
        "sku": "mug-product",
        "published": true,
        "images": [
          {
            "id": "media123456",
            "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
          }
        ]
      },
      "variant": {
        "id": "438954845899094",
        "name": "Black Small Mug",
        "code": "mug-black-small",
        "images": [
          {
            "id": "12345678",
            "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
          }
        ],
        "options": {
          "mug": {
            "color": "black",
            "size": "small"
          }
        },
        "mixins": {
          "additionalVariantCode": {
            "code": "variant code"
          }
        }
      },
      "mixins": {
        "additionalCode": {
          "code": "ABC"
        }
      }
    },
    {
      "id": "1234547",
      "amount": 5,
      "orderedAmount": 5,
      "originalAmount": 250,
      "originalPrice": 450,
      "unitPrice": 240,
      "totalPrice": 1200,
      "authorizedAmount": 1200,
      "product": {
        "metadata": {
          "mixins": {
            "color": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/color_v1.json"
          }
        },
        "description": "A Shirt you've always wanted !",
        "name": "Shirt",
        "sku": "shirt-product",
        "published": true,
        "images": [
          {
            "id": "media1234567",
            "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
          }
        ],
        "mixins": {
          "color": {
            "red": 234,
            "green": 231,
            "blue": 123
          }
        }
      },
      "variant": {
        "id": "968954845899234",
        "name": "Black Small T-Shirt",
        "code": "t-shirt-black-small",
        "images": [
          {
            "id": "12345679",
            "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
          }
        ],
        "options": {
          "tshirt": {
            "color": "black",
            "size": "small"
          }
        },
        "mixins": {
          "additionalVariantCode": {
            "code": "variant code"
          }
        }
      }
    },
    {
      "id": "1234548",
      "amount": 1,
      "unitPrice": 45,
      "totalPrice": 45,
      "authorizedAmount": 45,
      "measurementUnit": {
        "value": 2,
        "unit": "kg"
      },
      "link": "https://api.emporix.io/product/saasdev2/products/5c13ccdbba93e00008b8d274",
      "product": {
        "description": "Vegetables you've always wanted !",
        "name": "Vegetables",
        "sku": "vegetables-product",
        "published": true,
        "images": [
          {
            "id": "media1234548",
            "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
          }
        ]
      },
      "variant": {
        "id": "567954845899dee",
        "name": "5kg pack Mexican Vegetable",
        "code": "5kg-mexican-vegetable",
        "images": [
          {
            "id": "12345679",
            "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
          }
        ],
        "options": {
          "vegetable": {
            "size": "5kg",
            "type": "mexican"
          }
        },
        "mixins": {
          "additionalVariantCode": {
            "code": "variant code"
          }
        }
      }
    }
  ],
  "discounts": [
    {
      "code": "SUMMER_SALE",
      "name": "Summer Sale 10% off everything",
      "amount": 204,
      "currency": "USD",
      "discountRate": 10,
      "sequenceId": 1,
      "link": {
        "id": "B2TD3JM",
        "type": "y-coupon",
        "url": "https://api.emporix.io/coupon/saasdev2/coupons/ENG2OC"
      }
    }
  ],
  "customer": {
    "id": "C1234567890",
    "title": "Dr.",
    "name": "Example Buyer",
    "firstName": "Example",
    "lastName": "Buyer",
    "email": "noreply@emporix.com",
    "company": "emporix",
    "metadata": {
      "mixins": {
        "work_phone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
      }
    },
    "mixins": {
      "work_phone": {
        "number": "+86 334 0033 9934"
      }
    }
  },
  "siteCode": "Germany",
  "countryCode": "DE",
  "deliveryWindowId": "5d230f973f05e303d5c30dba",
  "billingAddress": {
    "contactName": "Example Buyer",
    "street": "Nymphenburger Str.",
    "streetNumber": "86",
    "city": "Munich",
    "state": "Bavaria",
    "country": "DE",
    "zipCode": "132 45",
    "contactPhone": "+49 1111 222 333"
  },
  "shippingAddress": {
    "contactName": "Joe Smith",
    "companyName": "Cargo Services Airfreight",
    "street": "Cheng Xiang Zhen Guan Tang Lu",
    "streetNumber": "1031",
    "extraLine1": "No. 2058",
    "extraLine2": "Suzhou City",
    "zipCode": "201202",
    "city": "Taicang City",
    "state": "Jiangsu Province",
    "country": "CN",
    "contactPhone": "+86 182 9349 4663",
    "metadata": {
      "mixins": {
        "secondaryContactPhone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
      }
    },
    "mixins": {
      "secondaryContactPhone": {
        "number": "+86 334 0033 9934"
      }
    }
  },
  "subTotalPrice": 1881,
  "totalPrice": 2041,
  "totalAuthorizedAmount": 2041,
  "currency": "USD",
  "payments": [
    {
      "status": "SUCCESS",
      "method": "STRIPE",
      "paymentResponse": "",
      "paidAmount": 2041,
      "currency": "USD"
    }
  ],
  "tax": {
    "total": {
      "amount": 150.0,
      "currency": "USD"
    },
    "lines": [
      {
        "amount": 150.0,
        "currency": "USD",
        "code": "VAT",
        "name": "Regular VAT",
        "rate": 10,
        "taxable": 1500.0,
        "sequenceId": 1,
        "inclusive": false
      }
    ]
  },
  "shipping": {
    "total": {
      "amount": 10.0,
      "currency": "USD"
    },
    "lines": [
      {
        "amount": 10.0,
        "currency": "USD",
        "code": "dhlstd",
        "name": "DHL Standard"
      }
    ]
  },
  "shipments": [
    {
      "trackingNumber": "123987456",
      "carrier": "UPS",
      "shippedDate": "2016-06-25T16:22:52.966Z",
      "expectDeliveryOn": "2016-06-27"
    }
  ]
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (404)
{
  "status": 42,
  "type": "string",
  "message": "string",
  "moreInfo": "https://example.com",
  "details": [
    {
      "field": "string",
      "type": "string",
      "message": "string",
      "moreInfo": "https://example.com"
    }
  ]
}

Salesorders

Retrieves created orders

Retrieves created orders, as a merchant, for administrative purposes.

Requires scope order.order_read.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Query parameters
  • sort string

    The list of comma-separated properties used to sort the results.
    By default, the column values are sorted in ascending order.
    Can either be in the form of fieldName or fieldName:asc,fieldName:desc.
    If you want to sort by localized attributes, you must use the following form:
    fieldName.language or fieldName.language:asc,fieldName.language:desc.

  • pageNumber integer

    The page number to be retrieved where the size of the pages must be specified by the pageSize parameter.
    The number of the first page is 1.

    Minimum value is 1. Default value is 1.

  • pageSize integer

    The number of documents being retrieved on the page.

    Minimum value is 1. Default value is 16.

  • q string

    The simple query criteria based on available fields to limit returned results or a set of modified documents.

Responses
  • 200
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server side error occurred.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /{tenant}/salesorders
$ curl \
 -X GET https://api.emporix.io/order/{tenant}/salesorders \
 -H "authorization: string" \
 -H "saas-token: string"
Response example (200)
[
  {
    "id": "orderId123456",
    "metadata": {
      "mixins": {
        "additionalCode": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"
      }
    },
    "mixins": {
      "additionalCode": {
        "code": "DFG-334-98330-X"
      }
    },
    "created": "2014-03-31T10:18:21.134Z",
    "completed": "2014-04-15T10:18:21.134Z",
    "status": "COMPLETED",
    "siteCode": "Germany",
    "countryCode": "DE",
    "deliveryWindowId": "5d230f973f05e303d5c30dba",
    "orderCycle": "2014-04-12T14:00:00.000Z",
    "channel": {
      "name": "Pinterest",
      "source": "https://www.pinterest.com/pin/123456"
    },
    "entries": [
      {
        "id": "5c13ccdbba93e00008b8d274",
        "amount": 2,
        "orderedAmount": 2,
        "originalAmount": 450,
        "originalPrice": 450,
        "unitPrice": 420,
        "totalPrice": 840,
        "authorizedAmount": 840,
        "link": "https://api.emporix.io/product/saasdev2/products/5c13ccdbba93e00008b8d274",
        "product": {
          "description": "A mug you've always wanted !",
          "name": "Mug",
          "sku": "mug-product",
          "published": true,
          "images": [
            {
              "id": "media123456",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ]
        },
        "variant": {
          "id": "438954845899094",
          "name": "Black Small Mug",
          "code": "mug-black-small",
          "images": [
            {
              "id": "12345678",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ],
          "options": {
            "mug": {
              "color": "black",
              "size": "small"
            }
          },
          "mixins": {
            "additionalVariantCode": {
              "code": "variant code"
            }
          }
        }
      },
      {
        "id": "1234547",
        "amount": 5,
        "orderedAmount": 5,
        "originalAmount": 250,
        "originalPrice": 450,
        "unitPrice": 240,
        "totalPrice": 1200,
        "authorizedAmount": 1200,
        "product": {
          "metadata": {
            "mixins": {
              "color": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/color_v1.json"
            }
          },
          "description": "A Shirt you've always wanted !",
          "name": "Shirt",
          "sku": "shirt-product",
          "published": true,
          "images": [
            {
              "id": "media1234567",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ],
          "mixins": {
            "color": {
              "red": 234,
              "green": 231,
              "blue": 123
            }
          }
        },
        "variant": {
          "id": "968954845899234",
          "name": "Black Small T-Shirt",
          "code": "t-shirt-black-small",
          "images": [
            {
              "id": "12345679",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ],
          "options": {
            "tshirt": {
              "color": "black",
              "size": "small"
            }
          },
          "mixins": {
            "additionalVariantCode": {
              "code": "variant code"
            }
          }
        }
      }
    ],
    "discounts": [
      {
        "code": "SUMMER_SALE",
        "name": "Summer Sale 10% off everything",
        "amount": 204,
        "currency": "USD",
        "discountRate": 10,
        "sequenceId": 1,
        "link": {
          "id": "B2TD3JM",
          "type": "y-coupon",
          "url": "https://api.emporix.io/coupon/saasdev2/coupons/ENG2OC"
        }
      }
    ],
    "customer": {
      "id": "C1234567890",
      "title": "Dr.",
      "name": "Example Buyer",
      "firstName": "Example",
      "lastName": "Buyer",
      "email": "noreply@emporix.com",
      "company": "emporix"
    },
    "billingAddress": {
      "contactName": "Example Buyer",
      "street": "Nymphenburger Str.",
      "streetNumber": "86",
      "city": "Munich",
      "state": "Bavaria",
      "country": "Germany",
      "zipCode": "132 45",
      "contactPhone": "+49 1111 222 333"
    },
    "shippingAddress": {
      "contactName": "Joe Smith",
      "companyName": "Cargo Services Airfreight",
      "street": "Cheng Xiang Zhen Guan Tang Lu",
      "streetNumber": "1031",
      "extraLine1": "No. 2058",
      "extraLine2": "Suzhou City",
      "zipCode": "201202",
      "city": "Taicang City",
      "state": "Jiangsu Province",
      "country": "CN",
      "contactPhone": "+86 182 9349 4663",
      "metadata": {
        "mixins": {
          "secondaryContactPhone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
        }
      },
      "mixins": {
        "secondaryContactPhone": {
          "number": "+86 334 0033 9934"
        }
      }
    },
    "subTotalPrice": 1881,
    "totalPrice": 2041,
    "totalAuthorizedAmount": 2041,
    "currency": "USD",
    "payments": [
      {
        "status": "SUCCESS",
        "method": "STRIPE",
        "paymentResponse": "",
        "paidAmount": 2041,
        "currency": "USD"
      }
    ],
    "tax": {
      "total": {
        "amount": 150.0,
        "currency": "USD"
      },
      "lines": [
        {
          "amount": 150.0,
          "currency": "USD",
          "code": "VAT",
          "name": "Regular VAT",
          "rate": 10,
          "taxable": 1500.0,
          "sequenceId": 1,
          "inclusive": false
        }
      ]
    },
    "shipping": {
      "total": {
        "amount": 10.0,
        "currency": "USD"
      },
      "lines": [
        {
          "amount": 10.0,
          "currency": "USD",
          "code": "dhlstd",
          "name": "DHL Standard"
        }
      ]
    },
    "shipments": [
      {
        "trackingNumber": "123987456",
        "carrier": "UPS",
        "shippedDate": "2016-06-25T16:22:52.966Z",
        "expectDeliveryOn": "2016-06-27"
      }
    ]
  },
  {
    "id": "orderId123457",
    "created": "2015-02-11T03:12:33.345Z",
    "status": "CREATED",
    "deliveryWindowId": "5d230f973f05e303d5c30dba",
    "siteCode": "Germany",
    "countryCode": "DE",
    "channel": {
      "name": "Twitter",
      "source": "https://twitter.com/emporix/status/707599225782214656"
    },
    "entries": [
      {
        "metadata": {
          "mixins": {
            "additionalCode": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"
          }
        },
        "id": "5c13ccdbba93e00008b8d274",
        "amount": 1,
        "unitPrice": 420,
        "totalPrice": 420,
        "authorizedAmount": 420,
        "link": "https://api.emporix.io/product/saasdev2/products/5c13ccdbba93e00008b8d274",
        "product": {
          "description": "A mug you've always wanted !",
          "name": "Mug",
          "sku": "mug-product",
          "published": true,
          "images": [
            {
              "id": "media123456",
              "url": "https://res.cloudinary.com/saas-ag/image/upload/55db925ed94e8d92c6b4cfe9_vksjjg.jpg"
            }
          ]
        },
        "mixins": {
          "additionalCode": {
            "code": "ABC"
          }
        }
      }
    ],
    "customer": {
      "id": "C1234567890",
      "title": "Dr.",
      "name": "Example Buyer",
      "firstName": "Example",
      "lastName": "Buyer",
      "email": "noreply@emporix.com",
      "company": "emporix",
      "metadata": {
        "mixins": {
          "work_phone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
        }
      },
      "mixins": {
        "work_phone": {
          "number": "+86 334 0033 9934"
        }
      }
    },
    "billingAddress": {
      "contactName": "Example Buyer",
      "street": "Nymphenburger Str.",
      "streetNumber": "86",
      "city": "Munich",
      "state": "Bavaria",
      "country": "DE",
      "zipCode": "132 45",
      "contactPhone": "+49 1111 222 333"
    },
    "shippingAddress": {
      "contactName": "Joe Smith",
      "companyName": "Cargo Services Airfreight",
      "street": "Cheng Xiang Zhen Guan Tang Lu",
      "streetNumber": "1031",
      "extraLine1": "No. 2058",
      "extraLine2": "Suzhou City",
      "zipCode": "201202",
      "city": "Taicang City",
      "state": "Jiangsu Province",
      "country": "CN",
      "contactPhone": "+86 182 9349 4663",
      "metadata": {
        "mixins": {
          "secondaryContactPhone": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/contact-number.json"
        }
      },
      "mixins": {
        "secondaryContactPhone": {
          "number": "+86 334 0033 9934"
        }
      }
    },
    "totalPrice": 420,
    "totalAuthorizedAmount": 420,
    "currency": "USD"
  }
]
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "q",
      "message": "not a valid query",
      "type": "invalid_query_parameter"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Creates an order

Creates an order, as a merchant, on behalf of a customer.

Field entries.originalAmount is DEPRECATED, instead use entries.originalPrice.

Requires scope order.order_create.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 201 string

    The collection resource has been successfully created.

    • Location string

      The Location of the new resource which was created by the request.
      The value consists of a single absolute URI.

  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Given authorization scopes are not sufficient and do not match required scopes.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 409 object

    Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 500 object

    Some server side error occurred.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /{tenant}/salesorders
$ curl \
 -X POST https://api.emporix.io/order/{tenant}/salesorders \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -H "saas-token: string" \
 -d '{"metadata":{"mixins":{"additionalCode":"https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"}},"sessionId":"843379ab-66a1-4ab2-8cd2-c1bb3dc04d39","mixins":{"additionalCode":{"code":"DFG-334-98330-X"}},"entries":[{"metadata":{"mixins":{"additionalCode":"https://res.cloudinary.com/saas-ag/raw/upload/schemata/CAAS/example-schema.json"}},"id":"5c13ccdbba93e00008b8d274","amount":2,"orderedAmount":2,"originalPrice":400,"originalAmount":400,"unitPrice":420,"totalPrice":...}'
Request payload example
# Headers
authorization: string
saas-token: string
Response example (201)
# Headers
Location: string
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Given request does not have required scopes. It is not authorized to perform this operation.",
  "type": "insufficient_permissions"
}
Response example (409)
{
  "status": 409,
  "message": "The requested resource could not be created due to server-side validation.",
  "moreInfo": "",
  "type": "conflict_resource"
}
Response example (500)
{
  "status": 500,
  "message": "Something went wrong while processing the request. Please contact the administrator.",
  "moreInfo": "",
  "type": "internal_service_error"
}

Transitions

Possible status transitions for the specific order

Possible status transitions for the specific order (as a merchant).

Requires scope order.order_update.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 200 string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /{tenant}/salesorders/{orderId}/transitions
$ curl \
 -X GET https://api.emporix.io/order/{tenant}/salesorders/{orderId}/transitions \
 -H "authorization: string" \
 -H "saas-token: string"
Response example (200)
{
  "status": "CONFIRMED"
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}

Updates the status of the specific order

Updates the status of the specific order (as a merchant).

Requires scope order.order_update.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 204
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /{tenant}/salesorders/{orderId}/transitions
$ curl \
 -X POST https://api.emporix.io/order/{tenant}/salesorders/{orderId}/transitions \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -H "saas-token: string" \
 -d '{"status":"CONFIRMED"}'
Request payload example
# Headers
authorization: string
saas-token: string
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}

Possible status transitions for the specific order

Possible status transitions for the specific order (as a customer).

Requires scope order.order_updateascustomer.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 200 string
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

GET /{tenant}/orders/{orderId}/transitions
$ curl \
 -X GET https://api.emporix.io/order/{tenant}/orders/{orderId}/transitions \
 -H "authorization: string" \
 -H "saas-token: string"
Response example (200)
{
  "status": "DECLINED"
}
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}

Updates the status of an order

Updates the status of an order (as a customer).

Requires scope order.order_updateascustomer.

Headers
  • authorization Required / string

    Bearer token

  • saas-token Required / string

    Token used to identify loggedin users. This token has an expiery date and is signed with a passphrase.

Path parameters
  • tenant Required / string

    The tenant that the caller is acting upon.

    Please note that this value is always lowercase.

Responses
  • 204
  • 400 object

    Request syntactically incorrect. Any details will be provided within the response payload.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

  • 403 object

    Access forbidden. The caller is not allowed to access this resource.

    • status Required / integer

      original HTTP error code, should be consistent with the response HTTP code

      Minimum value is 100, maximum value is 599.

    • type Required / string

      classification of the error type, lower case with underscore eg validation_failure

    • message string

      descriptive error message for debugging

    • moreInfo string(uri)

      link to documentation to investigate further and finding support

    • details array[object]

      list of problems causing this error

      • field string

        a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific

      • type Required / string

        classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.

      • message string

        descriptive error detail message for debugging

      • moreInfo string(uri)

        link to documentation to investigate further and finding support for error detail

POST /{tenant}/orders/{orderId}/transitions
$ curl \
 -X POST https://api.emporix.io/order/{tenant}/orders/{orderId}/transitions \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -H "saas-token: string" \
 -d '{"status":"DECLINED"}'
Request payload example
# Headers
authorization: string
saas-token: string
Response example (400)
{
  "status": 400,
  "message": "There are validation problems, see details section for more information",
  "moreInfo": "",
  "type": "validation_violation",
  "details": [
    {
      "field": "client-owner",
      "message": "must be between 3 and 16 characters",
      "type": "invalid_header"
    }
  ]
}
Response example (403)
{
  "status": 403,
  "message": "Not allowed to access this resource",
  "moreInfo": "",
  "type": "insufficient_permissions"
}