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": "<string>",
  "shipping_address_id": "<string>",
  "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": "<string>",
  "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": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "client_profile": {
      "gender": "<string>",
      "date_birth": "2023-12-25",
      "terms": true,
      "phone": "<string>"
    }
  }
}

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.

client
string
default: <YOUR_CLIENT_AUTH_TOKEN>required

The client authorization token: auth_token

billing_address_id
string

The identifier for the billing address.

shipping_address_id
string

The identifier for the shipping address.

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.

Response

201 - application/json
id
integer

An identifier associated with the order.

created
string

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

amount
string

The total monetary value of the order.

status
string

The status of the order.

payment_method
string

The payment method used in the order.

reference
string

A unique identifier or reference number associated with the order.

is_oneclick
boolean

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

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.