Integrations - API


In Integrations section you can find API which allows you to connect any external system with ORD and vice versa.

You can use it and exchange information about products, orders, payment methods and more between 2 or more systems.

Introduction

The API is available at https://cloud.ord.to/api/v1/

Authorization using the API key, which should be passed as the apiKey parameter in the URL. Example:

https://cloud.ord.to/api/v1/?apiKey=87b64d7f790a946cfac04fa

Each user has a unique API key, that can be found here:

 

You can change the initial API key by pressing the button "Generate a new API key"

 

WARNING! 

If you generte a new API key, the current one will stop working.

 

 

Add product

POST - https://cloud.ord.to/api/v1/product/add?apiKey=87b64d7f790a946cfac04fa

BODY

{

"name":"Product name",

"tagline":"Product tagline",

"description":"Product short description",

"vatRate":289,

"price":"100.51",

"net":"93.06",

"categories": [ 44, 57 ],

"images": [ { "image":"products/6iwuzevcnoyhjiuxvkmxit3y60rovz5n.png" },

{ "image":"products/awxxkrn59izswoyz7bcb91syywaqyg3a.png" } ]

}

Response

{

"status": "ok",

"data": { "id": 180, "name": "Product name" }

}


 

 

List of products

GET https://cloud.ord.to/api/v1/product/list?apiKey=87b64d7f790a946cfac04fa

Response

{

"status": "ok",

"data": [ { "id": 183, "name": "Test Product", "price": 100.51, ... } ]

}


 

 

Change product status

PUT https://cloud.ord.to/api/v1/product/{product_id}/status?apiKey=87b64d7f790a946cfac04fa

BODY

{

"forSell": true

}

Response

{

"status": "ok",

"data": { "id": 180, "name": "Product name", "forSell": true, ... }

}


 

 

VAT rates

GET https://cloud.ord.to/api/v1/vat-rates?apiKey=87b64d7f790a946cfac04fa

Response

{

"status":"ok",

"data":[ { "id":289, "name":"23%" },        { "id":290, "name":"22%" } ]

}


 

 

Categories

GET https://cloud.ord.to/api/v1/categories?apiKey=87b64d7f790a946cfac04fa

Response

{

"status":"ok",

"data":[ { "id":58, "name":"Category 1" },  { "id":57, "name":"Category 2" } ]

}


 

 

Add category

POST https://cloud.ord.to/api/v1/categories/add?apiKey=87b64d7f790a946cfac04fa

BODY

{

"name":"Category name"

}

Response

{

"status": "ok",

"data": { "id": 59, "name": "Category name" }

}


 

 

Upload image

POST https://cloud.ord.to/api/v1/product/upload-image?apiKey=87b64d7f790a946cfac04fa

BODY

Parameter "image" (formData file)

Response

{

"status":"ok",

"data":{ "file":"products/tgzsk5tnal9qfhgk3c1ksfaiivzbacy6.png" }

}


 

 

Acceptable types of orders

GET https://cloud.ord.to/api/v1/order/type?apiKey=87b64d7f790a946cfac04fa

Response

{

"status": "ok",

"data": [ { "id": 1, "name": "Delivery" },          { "id": 2, "name": "Personal pickup" },  { "id": 3, "name": "Table delivery" } ]

}


 

 

Payment methods for the order

GET https://cloud.ord.to/api/v1/order/payment-type?apiKey=87b64d7f790a946cfac04fa

Response

{

"status": "ok",

"data": [ { "id": 5, "name": "Cash on delivery" },  { "id": 7, "name": "Card on delivery" },  { "id": 1, "name": "Transfer" } ]

}


 

 

Add order

POST https://cloud.ord.to/api/v1/order/add?apiKey=87b64d7f790a946cfac04fa

BODY

{

"orderType": 1,

"paymentType": 5,

"street": "Test",

"hn": "24", "fn": "11",

"postalCode": "10-890",

"city": "Olsztyn",

"phone": "+48111111111",

"email": "test@gmail.com",

"products": [ { "product": 167, "qt": 3, "tagId": 83, "additions": [61], "priceOption": 22 } ]

}

Response

{

"status": "ok",

"data": { "id": 426, "number_raw": 269, "number": "00269", "created_at": "2020-09-18T07:10:04+0000", "status": 1, "payment_type": 5, "payment_status": 6, ... }

}


 

 

Order information

GET https://cloud.ord.to/api/v1/order/{id}?apiKey=87b64d7f790a946cfac04fa

Response

{

"status": "ok",

"data": { "id": 426, "number_raw": 269, "number": "00269", "created_at": "2020-09-18T07:10:04+0000", "status": 1, "payment_type": 5, "payment_status": 6, ... }

}

 

List of orders

GET https://cloud.ord.to/api/v1/orders?apiKey=87b64d7f790a946cfac04fa&page=1

Response

{

"status": "ok",

"page": 1,

"count": 66,

"limit": 20,

"data": { "id": 426, "number_raw": 269, "number": "00269", "created_at": "2020-09-18T07:10:04+0000", "status": 1, "payment_type": 5, "payment_status": 6, ... }

}

 

Change order status

PUT https://cloud.ord.to/api/v1/order/{order_id}/status?apiKey=87b64d7f790a946cfac04fa

Possible statuses

  1. New
  2. Rejected
  3. Returned
  4. To accept
  5. Preparing
  6. In delivery
  7. Delivered

BODY

{

"orderStatus": 1

}

Response

{

"status": "ok",

"data": { "id": 426, "status": 1, ... }

}

 

Change order payment status

PUT https://cloud.ord.to/api/v1/order/{order_id}/payment-status?apiKey=87b64d7f790a946cfac04fa

Possible statuses

  • Waiting for payment
  • Received by wire transfer
  • Received by PayPal
  • Received by Credit Card
  • Received by Dotpay
  • Cash on delivery
  • Received by Paylane
  • Card on delivery
  • Received by Przelewy24
  • Received by Square

BODY

{

"paymentStatus": 1

}

Response

{

"status": "ok",

"data": { "id": 426, "payment_status": 1, ... }

}