NAV
Subscribe to developer updates

Order API v2.0.0

Base URL = ://undefined/

Default

POST /billing

Code samples

Add / Update the billing address in quote object

Parameters

Parameter In Type Required Description
quote query string false No description
billingData body BillingRequestData false No description

Body parameter

{}

Responses

Status Meaning Description
200 OK Billing address has been successfully updated

Example responses

{}

GET /cart

Code samples

Retrieve cart data

Retrieves a cart, which is the composition of set of items

Responses

Status Meaning Description
200 OK The cart

Example responses

{
  "meta": {},
  "data": {}
}

POST /coupon

Code samples

Adding coupon or gift certificate code to the cart

Parameters

Parameter In Type Required Description
couponCode body string false coupon or gift certificate code

Body parameter

"string"

Responses

Status Meaning Description
200 OK Cart with coupon or gift certificate added
422 Unprocessable Entity The coupon or gift certificate code cannot be added to the cart e.g. coupon code expired

Example responses

{}

DELETE /coupon/{couponCode}

Code samples

Removing coupon or gift certificate code from the cart

Parameters

Parameter In Type Required Description
couponCode path string true coupon or gift certificate code

Responses

Status Meaning Description
200 OK Cart with coupon or gift certificate removed
400 Bad Request The coupon or gift certificate code cannot be removed from the cart

Example responses

{}

POST /customer

Code samples

Associate the quote object to a customer. Parameters are comma separated as values against includes key. For example, /quote?includes=customer,shippingOptions

Parameters

Parameter In Type Required Description
quote query string false No description
customer query string false No description
shippingAddress query string false No description
billingAddress query string false No description
shippingOptions query string false No description
cart query string false No description
order query string false No description

Responses

Status Meaning Description
200 OK Based on existing query parameters a series of data will be added to response
400 Bad Request If user tries to login but the provided username or password is incorrect
401 Unauthorized Unauthorized Acess

Example responses

{}

GET /customer

Code samples

currently any GET request to /customer end point will result to a 405 response because getAction() method does’t exists

Parameters

Parameter In Type Required Description
quote query string false No description
customer query string false No description
shippingAddress query string false No description
billingAddress query string false No description
shippingOptions query string false No description
cart query string false No description
order query string false No description

Responses

Status Meaning Description
405 Method Not Allowed Method not allowed

DELETE /customer

Code samples

Remove customer information from the quote.

Parameters

Parameter In Type Required Description
quote query string false No description
customer query string false No description
shippingAddress query string false No description
billingAddress query string false No description
shippingOptions query string false No description
cart query string false No description

Responses

Status Meaning Description
200 OK Updated customer data, billing address & shipping address; Mostly empty fields.

Example responses

{}

POST /order

Code samples

Used to create an order (currently we use session to retrieve quote data)

Parameters

Parameter In Type Required Description
Data body RequestOrderData true A collection of data consumed by the order endpoint when creating the order for different payment methods and payment providers.

Body parameter

{}

Responses

Status Meaning Description
201 Created Successful response
400 Bad Request Invalid input - Happens when request body is not in json or cannot be decoded as json
500 Internal Server Error The requested payment provider is not implemented correctly
503 Service Unavailable Shop order token is missing from quote or quote is empty

Response Headers

Status Header Type Format Description
201 token string JWT token, combination of cart_id, store_id, amount and currency.

Example responses

{}

GET /order/{orderId}

Code samples

Retrieve order data

Retrieves an order, which is the composition of set of items

Parameters

Parameter In Type Required Description
orderId path integer true Id of the Order

Responses

Status Meaning Description
200 OK The order
404 Not Found No order matching orderId

Example responses

{}

POST /order/{orderId}

Code samples

Update the order. Finalize in case the order has been set previously in checkout

Parameters

Parameter In Type Required Description
orderId path integer true Id of the Order

Responses

Status Meaning Description
200 OK The updated Order

Example responses

{
  "id": "string",
  "items": [
    {}
  ],
  "currency": "string",
  "subtotal": {
    "amount": 0,
    "integerAmount": 0
  },
  "coupon": {
    "discountedAmount": 0,
    "coupons": [
      {}
    ]
  },
  "discount": {
    "amount": 0
  },
  "giftCertificate": {
    "totalDiscountedAmount": 0,
    "appliedGiftCertificates": [
      {}
    ]
  },
  "shipping": {
    "amount": 0,
    "amountBeforeDiscount": 0,
    "integerAmount": 0,
    "integerAmountBeforeDiscount": 0,
    "required": true
  },
  "storeCredit": {
    "amount": 0
  },
  "taxSubtotal": {
    "amount": 0,
    "integerAmount": 0
  },
  "taxTotal": {
    "amount": 0,
    "integerAmount": 0
  },
  "handling": {
    "amount": 0,
    "integerAmount": 0
  },
  "grandTotal": {
    "amount": 0,
    "integerAmount": 0
  },
  "discountNotifications": [
    {}
  ],
  "orderId": 0,
  "token": "string",
  "payment": {},
  "socialData": [
    {}
  ],
  "status": "ORDER_STATUS_INCOMPLETE",
  "customerCreated": true,
  "hasDigitaItems": true,
  "isDownloadable": true,
  "isComplete": true,
  "callbackUrl": "string"
}

POST /order/{orderId}/payment

Code samples

Update the payment and order status from payment service (BigPay) & finalize the order. Requires HAWK authentication.

Parameters

Parameter In Type Required Description
orderId path integer true Id of the Order to be updated
paymentData body PaymentRequestData true No description

Body parameter

{
  "gateway": "string",
  "status": "PAYMENT_SUCCESS",
  "transactionType": "TRANSACTION_AUTHORIZATION",
  "amount": 0,
  "amountAsInteger": 0,
  "cardType": "string",
  "lastFourDigitsOfCard": 0,
  "providerTransactionId": "string",
  "providerAuthorizationCode": "string",
  "errors": [
    {}
  ]
}

Responses

Status Meaning Description
200 OK The updated Order

Example responses

{
  "id": "string",
  "items": [
    {}
  ],
  "currency": "string",
  "subtotal": {
    "amount": 0,
    "integerAmount": 0
  },
  "coupon": {
    "discountedAmount": 0,
    "coupons": [
      {}
    ]
  },
  "discount": {
    "amount": 0
  },
  "giftCertificate": {
    "totalDiscountedAmount": 0,
    "appliedGiftCertificates": [
      {}
    ]
  },
  "shipping": {
    "amount": 0,
    "amountBeforeDiscount": 0,
    "integerAmount": 0,
    "integerAmountBeforeDiscount": 0,
    "required": true
  },
  "storeCredit": {
    "amount": 0
  },
  "taxSubtotal": {
    "amount": 0,
    "integerAmount": 0
  },
  "taxTotal": {
    "amount": 0,
    "integerAmount": 0
  },
  "handling": {
    "amount": 0,
    "integerAmount": 0
  },
  "grandTotal": {
    "amount": 0,
    "integerAmount": 0
  },
  "discountNotifications": [
    {}
  ],
  "orderId": 0,
  "token": "string",
  "payment": {},
  "socialData": [
    {}
  ],
  "status": "ORDER_STATUS_INCOMPLETE",
  "customerCreated": true,
  "hasDigitaItems": true,
  "isDownloadable": true,
  "isComplete": true,
  "callbackUrl": "string"
}

GET /payments

Code samples

Retrieve a list of existing payment methods

Responses

Status Meaning Description
200 OK List of payment methods

Example responses

{}

GET /payments/{providerId}

Code samples

Retrieve a single, existing payment method

Parameters

Parameter In Type Required Description
providerId path string true Id of the payment provider

Responses

Status Meaning Description
200 OK Payment method

Example responses

{}

GET /quote

Code samples

Parameters are comma separated as values against includes key. For example, /quote?includes=customer,shippingOptions

Parameters

Parameter In Type Required Description
quote query string false No description
customer query string false No description
shippingAddress query string false No description
billingAddress query string false No description
shippingOptions query string false No description
cart query string false No description
order query string false No description

Responses

Status Meaning Description
200 OK Based on existing query parameters a series of data will be added to response

Example responses

{}

POST /shipping

Code samples

Add / Update the shipping address in quote object

Parameters

Parameter In Type Required Description
cart query string false No description
quote query string false No description
shippingOptions query string false No description
shippingData body ShippingRequestData false No description

Body parameter

{}

Responses

Status Meaning Description
200 OK Shipping address has been successfully updated

Example responses

{}

GET /shippingOptions

Code samples

Retrieve Shipping Options

Retrieves a list of all available shipping options for the current quote

Responses

Status Meaning Description
200 OK List of the shipping options. In case the quote does not have shipping address the response will be an empty array.

Example responses

{
  "meta": {},
  "data": {
    "shippingOptions": {
      "addressId": [
        {}
      ]
    }
  }
}

PUT /shippingOptions

Code samples

Set Shipping Option

Set in the order the selected shipping option

Parameters

Parameter In Type Required Description
ShippingOptionRequestData body ShippingOptionRequestData false No description

Body parameter

{}

Responses

Status Meaning Description
200 OK ok
400 Bad Request Invalid shipping method
409 Conflict Shipping Option Method has expired
422 Unprocessable Entity Missing Required Fields

Example responses

{
  "meta": {},
  "data": {
    "shippingOptions": {
      "addressId": [
        {}
      ]
    }
  }
}