Skip to main content
POST
/
orders
/
complete
Complete Order
curl --request POST \
  --url https://api.nuwebgroup.com/v1/orders/complete \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "basketId": 1,
  "paymentMethod": "cash",
  "customerEmail": "[email protected]",
  "customerName": "John Smith",
  "transactionId": null,
  "inhibitConfirmationEmail": false
}
'
{
  "id": 1,
  "total": 1000,
  "tax": 50,
  "paid": 1000,
  "currencyId": 1,
  "currencySymbol": "Ā£",
  "currencyCode": "GBP",
  "reference": "RO3PMNGE1N",
  "date": "2021-11-22T11:59:00.000000Z",
  "customerName": "John Smith",
  "customerEmail": "[email protected]",
  "paymentMethod": [
    "Cash"
  ],
  "items": [
    {
      "barcode": "97WG2VGJK2",
      "fullSpaceName": "T2-3 (Blue)",
      "price": 500,
      "tax": 50,
      "taxRate": 10,
      "refunded": 0,
      "validFrom": null,
      "validTo": null,
      "eventStartDate": "2021-11-22T11:59:00.000000Z",
      "eventEndDate": "2021-11-22T11:59:00.000000Z",
      "customerName": "John Smith",
      "customerEmail": "[email protected]",
      "customerDetailsUnknown": false,
      "scanningMode": false,
      "venue": {
        "id": 1,
        "name": "alias quo",
        "address": "629 Mante Centers",
        "city": "possimus",
        "region": null,
        "latitude": null,
        "longitude": null,
        "postcode": "72043-7529"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

The 'Bearer' token can be obtained from the token management interface or via the login endpoint using your admin user credentials.

Query Parameters

only
string

A list of attributes that you wish to be returned in the payload. When empty or omitted, all fields will be included by default. Use dot-notation for both top-level resources and child resources, i.e. orders.id,orderItems.saleItemId,venues.name. Can be used in conjunction with except providing both parameters don't reference the same resource.

except
string

A list of attributes that you wish to exclude from the payload. When empty or omitted, all fields will be included by default. Use dot-notation for both top-level resources and child resources, i.e. orders.id,orderItems.saleItemId,venues.name. Can be used in conjunction with only providing both parameters don't reference the same resource.

Body

application/json

Request body for completing an order

basketId
integer

The basket ID for which we want to complete an order. Basket IDs and Order IDs can be used interchangeably.

paymentMethod
enum<string>

The payment method for the order. This will determine the transaction type for reporting purposes. This value will override the value stored against the supplied transactionId (if provided).

Available options:
card-not-present-offline,
card-not-present-online,
card-present-offline,
card-present-online,
cash,
complimentary,
bank,
ewallet-online,
cheque,
gift-card,
money-order,
split
paymentSplits
object[]

Breakdown of payments when using the 'split' payment method. The sum of all splits must equal the order total.

paymentPlan
object

A payment plan object. This is currently only applicable for the processing of deposit payments. If a transanctionId is supplied, this must be omitted.

Example:
{ "type": "deposit" }
customerId
integer

If a customer can be found using this then customerName and customerEmail will be ignored.

customerName
string

Optional customer name, but required when the customer email doesn't already exist in the system.

customerEmail
string

Optional customer email. If this is present, fetch this user from the database and assign the order to this user.

customerSsoId
string

This will be used in combination with customerName + customerEmail OR customerId. Single sign-on identifier for the customer, optional & only applicable to companies using a custom SSO solution.

transactionId
string

Optional transaction ID. If supplied and valid, the transaction will be updated to a success status - otherwise a new transaction will be setup (providing the total is greater than 0).

inhibitConfirmationEmail
boolean

Pass true if you want to prevent sending the order confirmation email, otherwise pass false or omit this property completely.

source
object

You should provide the payment media ID that is responsible for this transaction (for accurate epos and wallet balance reporting).

Response

Successfully completed order.

id
integer
total
integer
tax
integer
paid
integer
currencyId
integer
currencySymbol
string
currencyCode
string
reference
string
date
string
customerName
string
customerEmail
string
paymentMethod
any[]
items
object[]