shipink-logo-vector-svgDocumentation

Orders

Create, list, update, and delete orders. An order must be created before a shipment can be generated.

List orders

Returns a paginated list of your orders.

GET
/orders
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Query Parameters

page?integer

Page number

Default1
Range1 <= value
limit?integer

Number of items per page

Default10
Range1 <= value <= 100

Response Body

application/json

curl -X GET "https://api.shipink.io/orders"

{
  "data": [
    {
      "id": "fF3jGNEosBXM",
      "customer": {
        "name": "Geralt of Rivia",
        "email": {
          "main": "geralt@rivia.com",
          "work": ""
        },
        "phone": {
          "main": "905545456789"
        },
        "address": {
          "street": "Kaer Morhen",
          "city": "Maltepe",
          "state": "İstanbul",
          "zip": "34044",
          "country_code": "TR"
        }
      },
      "items": [
        {
          "name": "Fisstech",
          "quantity": 3,
          "price": 500.9
        }
      ],
      "currency": "TRY",
      "price": 1500.5,
      "payment": {
        "method": "credit-card",
        "status": "completed"
      },
      "created_at": "2024-03-15T13:21:08Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 42
  }
}

Create an order

Creates a new order. An order must exist before a shipment can be generated.

POST
/orders
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

customer
items
currencystring
pricenumber
Formatfloat
payment?

Response Body

application/json

curl -X POST "https://api.shipink.io/orders" \  -H "Content-Type: application/json" \  -d '{    "customer": {      "name": "Geralt of Rivia",      "company": "Kaer Morhen",      "tax_id": "",      "email": {        "main": "geralt@rivia.com",        "work": ""      },      "phone": {        "main": "905545456789",        "work": "",        "cell": "",        "code": ""      },      "address": {        "street": "Kaer Morhen",        "city": "Maltepe",        "state": "İstanbul",        "zip": "34044",        "country_code": "TR"      }    },    "items": [      {        "name": "Fisstech",        "quantity": 3,        "category": "gadget",        "price": 500.9,        "hs_code": "",        "origin": "TR"      }    ],    "currency": "TRY",    "price": 1500.5,    "payment": {      "method": "credit-card",      "status": "completed"    }  }'
{
  "customer": {
    "name": "Geralt of Rivia",
    "company": "Kaer Morhen",
    "tax_id": "",
    "email": {
      "main": "user@example.com",
      "work": ""
    },
    "phone": {
      "main": "905321234567",
      "work": "",
      "cell": "",
      "code": ""
    },
    "address": {
      "street": "Example Street No:1",
      "city": "Maltepe",
      "city_code": "TR-34-108146",
      "state": "İstanbul",
      "state_code": "TR-34",
      "zip": "34857",
      "country": "Turkey",
      "country_code": "TR"
    }
  },
  "items": [
    {
      "name": "Product Name",
      "quantity": 3,
      "category": "gadget",
      "price": 500.9,
      "hs_code": "",
      "origin": "TR"
    }
  ],
  "currency": "TRY",
  "price": 1500.5,
  "payment": {
    "method": "credit-card",
    "status": "completed"
  },
  "id": "fF3jGNEosBXM",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

Get an order

Returns the details of the specified order.

GET
/orders/{order_id}
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Path Parameters

order_idstring

Order ID

Response Body

application/json

curl -X GET "https://api.shipink.io/orders/fF3jGNEosBXM"
{
  "customer": {
    "name": "Geralt of Rivia",
    "company": "Kaer Morhen",
    "tax_id": "",
    "email": {
      "main": "user@example.com",
      "work": ""
    },
    "phone": {
      "main": "905321234567",
      "work": "",
      "cell": "",
      "code": ""
    },
    "address": {
      "street": "Example Street No:1",
      "city": "Maltepe",
      "city_code": "TR-34-108146",
      "state": "İstanbul",
      "state_code": "TR-34",
      "zip": "34857",
      "country": "Turkey",
      "country_code": "TR"
    }
  },
  "items": [
    {
      "name": "Product Name",
      "quantity": 3,
      "category": "gadget",
      "price": 500.9,
      "hs_code": "",
      "origin": "TR"
    }
  ],
  "currency": "TRY",
  "price": 1500.5,
  "payment": {
    "method": "credit-card",
    "status": "completed"
  },
  "id": "fF3jGNEosBXM",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
Empty

Delete an order

Deletes the specified order.

DELETE
/orders/{order_id}
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Path Parameters

order_idstring

Order ID

Response Body

application/json

curl -X DELETE "https://api.shipink.io/orders/fF3jGNEosBXM"
{
  "message": "Operation completed successfully."
}

Update an order

Updates the specified order.

PUT
/orders/{order_id}
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Path Parameters

order_idstring

Order ID

customer?
items?
currency?string
price?number
Formatfloat

Response Body

application/json

curl -X PUT "https://api.shipink.io/orders/fF3jGNEosBXM" \  -H "Content-Type: application/json" \  -d '{    "customer": {      "name": "Radovid V",      "company": "Redenia",      "email": {        "main": "stern@radovid.com",        "work": ""      },      "phone": {        "main": "90535354544"      },      "address": {        "street": "HMS Oxenfurt-Tretogor",        "city": "Maltepe",        "city_code": "TR-34-108146",        "state": "İstanbul",        "state_code": "TR-34",        "zip": "34044",        "country": "Turkey",        "country_code": "TR"      }    },    "items": [],    "currency": "TRY",    "price": 0  }'
{
  "customer": {
    "name": "Geralt of Rivia",
    "company": "Kaer Morhen",
    "tax_id": "",
    "email": {
      "main": "user@example.com",
      "work": ""
    },
    "phone": {
      "main": "905321234567",
      "work": "",
      "cell": "",
      "code": ""
    },
    "address": {
      "street": "Example Street No:1",
      "city": "Maltepe",
      "city_code": "TR-34-108146",
      "state": "İstanbul",
      "state_code": "TR-34",
      "zip": "34857",
      "country": "Turkey",
      "country_code": "TR"
    }
  },
  "items": [
    {
      "name": "Product Name",
      "quantity": 3,
      "category": "gadget",
      "price": 500.9,
      "hs_code": "",
      "origin": "TR"
    }
  ],
  "currency": "TRY",
  "price": 1500.5,
  "payment": {
    "method": "credit-card",
    "status": "completed"
  },
  "id": "fF3jGNEosBXM",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

How is this guide?