latestOpenAPI 3.0.22026-08-10312271.6 KB

c5159bc39a84

Orders

Create an order

Place a new order in the API. You can choose the simple way and set the shipping type and the confirmed state in one request. Or you can create the order first and set the shipping type and the confirmed state later. It is also possible to mix both ways and set the shipping type direct and confirm later. You can order existing articles, or one-time items, which are created just for the respective order, and deleted afterwards. You need to add at least one orderItem or oneTimeItem.

post/orders

Request body

phonestring required

Phone used for the communication with the customer. Must not be blank.

emailstring email required

Email used for the communication with the customer. Must be a valid email address.

externalOrderReferencestring required

external order reference from merchant (you). Must not be blank.

externalOrderNamestring

external order name from merchant (you)

state'NEW' | 'CONFIRMED'

order state

customerTaxType'SALESTAX' | 'VAT' | 'NOT_TAXABLE'

tax type, salestax or vat

originstring

optional origin field

Example request

{
  "orderItems": [
    {
      "sku": "P1026247707A12S5",
      "externalOrderItemReference": "12810092145",
      "customerPrice": {
        "amount": 21.56,
        "currency": "USD"
      }
    }
  ],
  "oneTimeItems": [
    {
      "configurations": [
        {
          "image": {
            "url": "https://link.to.image",
            "designId": "1231"
          },
          "hotspot": "LEFT_CHEST"
        }
      ],
      "customerPricePerItem": {
        "amount": 21.56,
        "currency": "USD"
      }
    }
  ],
  "shipping": {
    "address": {
      "company": "Example Ltd.",
      "firstName": "Joshua",
      "lastName": "Anderson",
      "street": "1572 Roseytown Rd",
      "streetAnnex": "2nd Floor",
      "city": "Greensburg",
      "country": "US",
      "state": "AL",
      "zipCode": "15601"
    },
    "fromAddress": {
      "company": "Example Ltd.",
      "firstName": "Joshua",
      "lastName": "Anderson",
      "street": "1572 Roseytown Rd",
      "streetAnnex": "2nd Floor",
      "city": "Greensburg",
      "country": "US",
      "state": "AL",
      "zipCode": "15601"
    },
    "customerPrice": {
      "amount": 21.56,
      "currency": "USD"
    }
  },
  "billingAddress": {
    "company": "Example Ltd.",
    "firstName": "Joshua",
    "lastName": "Anderson",
    "street": "1572 Roseytown Rd",
    "streetAnnex": "2nd Floor",
    "city": "Greensburg",
    "country": "US",
    "state": "AL",
    "zipCode": "15601"
  },
  "phone": "+49 1520 1234567",
  "email": "joshua.anders@protonmail.ch",
  "externalOrderReference": "1722995712",
  "externalOrderName": "ORDER-12",
  "state": "CONFIRMED"
}

Response

Created

idinteger

order id from spreadconnect

orderReferenceinteger

order reference from spreadconnect, can be changed after order updates

externalOrderReferencestring

external order reference from merchant (you)

externalOrderNamestring

external order name from merchant (you)

state'NEW' | 'CONFIRMED' | 'PROCESSED' | 'CANCELLED'

order state

phonestring

Phone used for the communication with the customer.

emailstring

Email used for the communication with the customer.

taxType'SALESTAX' | 'VAT' | 'NOT_TAXABLE'

tax type, salestax or vat

customerTaxType'SALESTAX' | 'VAT' | 'NOT_TAXABLE'

tax type, salestax or vat

Example response

{
  "id": 123,
  "orderReference": 5550000,
  "externalOrderReference": "1722995712",
  "externalOrderName": "ORDER-12",
  "orderItems": [
    {
      "orderItemReference": 55000001,
      "externalOrderItemReference": "12810092145",
      "sku": "P1026247707A12S5",
      "price": {
        "amount": 21.56,
        "taxRate": 19,
        "taxAmount": 12.45,
        "currency": "USD"
      },
      "customerPrice": {
        "amount": 21.56,
        "currency": "USD"
      }
    }
  ],
  "shipping": {
    "address": {
      "company": "Example Ltd.",
      "firstName": "Joshua",
      "lastName": "Anderson",
      "street": "1572 Roseytown Rd",
      "streetAnnex": "2nd Floor",
      "city": "Greensburg",
      "country": "US",
      "state": "AL",
      "zipCode": "15601"
    },
    "fromAddress": {
      "company": "Example Ltd.",
      "firstName": "Joshua",
      "lastName": "Anderson",
      "street": "1572 Roseytown Rd",
      "streetAnnex": "2nd Floor",
      "city": "Greensburg",
      "country": "US",
      "state": "AL",
      "zipCode": "15601"
    },
    "type": {
      "id": "29",
      "company": "DHL",
      "name": "International Standard",
      "description": "No tracking provided. May be subject to import taxes, customs, and duties upon delivery."
    },
    "price": {
      "amount": 21.56,
      "taxRate": 19,
      "taxAmount": 12.45,
      "currency": "USD"
    },
    "customerPrice": {
      "amount": 21.56,
      "currency": "USD"
    }
  },
  "billingAddress": {
    "company": "Example Ltd.",
    "firstName": "Joshua",
    "lastName": "Anderson",
    "street": "1572 Roseytown Rd",
    "streetAnnex": "2nd Floor",
    "city": "Greensburg",
    "country": "US",
    "state": "AL",
    "zipCode": "15601"
  },
  "phone": "+49 1520 1234567",
  "email": "joshua.anders@protonmail.ch",
  "price": {
    "amount": 21.56,
    "taxRate": 19,
    "taxAmount": 12.45,
    "currency": "USD"
  }
}