POST
/
orders
curl --request POST \
  --url https://stage.tonder.io/api/v1/orders/ \
  --header 'Content-Type: application/json' \
  --data '{
  "business": "<YOUR_API_KEY>",
  "client": "<YOUR_CLIENT_AUTH_TOKEN>",
  "billing_address_id": null,
  "shipping_address_id": null,
  "amount": 123,
  "status": "<string>",
  "reference": "<string>",
  "is_oneclick": true,
  "items": [
    {
      "description": "<string>",
      "quantity": 123,
      "price_unit": 123,
      "discount": 123,
      "taxes": 123,
      "product_reference": 123,
      "name": "<string>",
      "amount_total": 123
    }
  ]
}'
{
  "id": 5910,
  "created": "2024-01-18T10:09:36.499975-06:00",
  "amount": "1200.0000",
  "status": "Activa",
  "payment_method": null,
  "reference": "1234556",
  "is_oneclick": true,
  "items": [
    {
      "description": "description test",
      "product_reference": "1",
      "quantity": "1.0000",
      "price_unit": "1.0000",
      "discount": "0.0000",
      "taxes": "0.0000",
      "amount_total": "1200.0000"
    }
  ],
  "billing_address": "<string>",
  "shipping_address": "<string>",
  "client": {
    "email": "pruebas@sdk.com",
    "name": "",
    "first_name": "",
    "last_name": "",
    "client_profile": {
      "gender": "",
      "date_birth": null,
      "terms": false,
      "phone": ""
    }
  }
}

The Authorization needs to be in the following format:

Authorization: Token <YOUR_API_KEY>

This endpoint enables the creation of new orders by adding an existing customer using their unique identifier.

Body

application/json
business
string
default:<YOUR_API_KEY>
required

Your Tonder API Key. You can retrieve it from the dashboard.

Example:

"<YOUR_API_KEY>"

client
string
default:<YOUR_CLIENT_AUTH_TOKEN>
required

The client authorization token: auth_token

Example:

"<YOUR_CLIENT_AUTH_TOKEN>"

amount
integer
required

The total monetary value of the transaction.

status
string
required

A code indicating the status of the transaction.

reference
string
required

A unique identifier or reference number associated with the transaction.

is_oneclick
boolean
required

A boolean value indicating whether the transaction involves a one-click purchase.

items
object[]
required

An array containing details about the items included in the transaction.

billing_address_id
string

The identifier for the billing address.

Example:

null

shipping_address_id
string

The identifier for the shipping address.

Example:

null

Response

201
application/json
Successful response
id
integer

An identifier associated with the order.

Example:

5910

created
string

The timestamp indicating the creation date and time of the order.

Example:

"2024-01-18T10:09:36.499975-06:00"

amount
string

The total monetary value of the order.

Example:

"1200.0000"

status
string

The status of the order.

Example:

"Activa"

payment_method
string

The payment method used in the order.

Example:

null

reference
string

A unique identifier or reference number associated with the order.

Example:

"1234556"

is_oneclick
boolean

A boolean value indicating whether the order involves a one-click purchase.

Example:

true

items
object[]

An array containing details about the items included in the order.

billing_address
string

The billing address information in the order.

shipping_address
string

The shipping address information in the order.

client
object

Contains information about the client.