Orders API
Use the orders API to extract information about orders, add new orders or update data in existing orders.
Fields available
The list below indicates all the fields available for this API, which are returned when extracting a list or individual resource, which can be modified, which are mandatory when creating a new resource or updating an existing resource.
Field | Type | Description | List | Not required |
---|---|---|---|---|
id | string | Order ID | ✔ | |
parent_id | int | The parent order ID for orders that have been split | ✔ | |
return_source_id | int | The initial order ID for orders that have been returned | ✔ | |
rma_orders | array | List of orders that were returned from the original order | ||
rma_orders.id | int | Return order ID | ||
rma_orders.type | string | Return type | ||
channel_name | string | The name of the sales channel from which the order was received | ✔ | |
channel_ref_id | string | External order identifier | ✔ | |
payment_status | string | Payment status. Possible values: temporary, awaiting, paid, failed, canceled, refunded, rejected | ✔ | ✔ |
payment_status_text | string | Textual representation of payment status | ✔ | |
payment_substatus_id | int | Payment substation ID | ✔ | ✔ |
payment_substatus_text | string | Textual representation of the payment substatus | ✔ | |
payment_method_code | string | Payment method code. Possible values (depending on active methods): librapay, paypal, skrill, 2checkout, epayment, euplatesc, cash_delivery, wire, in_store, mobilpay, nestpay, plationlinepo5, brd_finance, sofort, tbi, paypal_plus, libracredit, ipay | ✔ | ✔ |
payment_method_name | string | Name of the payment method | ✔ | |
payment_transaction_id | string | Payment reference identifier | ✔ | |
shipping_status | string | Delivery status. Possible values: awaiting, confirmed, in_process, shipped, delivered, returned, cancelled | ✔ | ✔ |
shipping_status_text | string | Textual representation of the delivery status | ✔ | |
shipping_substatus_id | int | Delivery substate ID | ✔ | ✔ |
shipping_substatus_text | string | Textual representation of the delivery substatus | ✔ | |
shipping_method_id | string | Internal ID of the delivery method | ✔ | ✔ |
shipping_method_name | string | Name of the delivery method | ✔ | |
shipping_delivery_info | array | Delivery details | ||
shipping_delivery_info.delivery_time | string | Delivery time | ||
shipping_delivery_info.pickup_address | array | Delivery address information | ✔ | |
pickup_address.id | int | Order pickup point ID (locker, easybox, office) | ✔ | |
pickup_address.name | string | Name of delivery address | ✔ | |
shipping_carrier_id | string | Courier ID used for delivery | ✔ | |
shipping_awb | string | AWB code from the courier system | ✔ | ✔ |
shipping_amount | float | Delivery cost | ✔ | ✔ |
shipping_tax_amount | float | The amount of the tax from the delivery cost | ✔ | |
total_amount | float | Total order value | ✔ | |
currency | string | Related currency (ISO 4217) | ✔ | |
original_currency | string | Currency in which the order was placed, if the order was placed in a currency other than the default currency (ISO 4217) | ✔ | |
currency_rate | float | Exchange rate for the currency in which the order was placed | ✔ | |
coupon_code | string | Coupon code used | ✔ | |
customer_id | int | Customer ID | ✔ | ✔ |
customer_email | int | The client's email address | ✔ | ✔ |
customer_ip_address | string | The IP address from which the order was placed | ✔ | |
customer_ip_country | string | The country corresponding to the IP from which the order was placed | ✔ | |
customer_device | string | Type of device used when placing the order (desktop, mobile) | ✔ | ✔ |
customer_lang | string | Language selected when placing the order | ✔ | ✔ |
customer_note | string | Customer comments | ✔ | ✔ |
customer_notification | string | Mentions of the administrator to the client | ✔ | ✔ |
date_created | data | Date of adding the order (ISO 8601 format) | ✔ | |
date_modified | data | Date of last modification (ISO 8601 format) | ✔ | |
date_shipped | data | Date on which the order was delivered (ISO 8601 format) | ✔ | |
date_delivered | data | Date the order was received by the customer (ISO 8601 format) | ✔ | |
created_by | string | The type of user who created the order (account, user) | ✔ | ✔ |
meta_fields | object | Additional fields | ✔ | ✔ |
internal_notes | array | List of internal notes | ✔ | ✔ |
internal_notes[]. id | int | Note ID | ✔ | |
internal_notes[]. text | int | The text related to the note | ✔ | ✔ |
tags | array | Order tags | ✔ | ✔ |
tags[]. id | int | Tag ID | ✔ | |
tags[]. name | int | Tag name | ✔ | ✔ |
billing_type | string | Account type, individual or company | ✔ | ✔ |
billing_name | string | Customer name | ✔ | ✔ |
billing_identity_number | string | Personal numerical code (in case of individual clients) | ✔ | ✔ |
billing_company_name | string | Company name (in case of legal entity clients) | ✔ | ✔ |
billing_company_number | string | Registration number (in case of clients of legal entities) | ✔ | ✔ |
billing_company_vat | string | Fiscal code (in case of clients legal entities) | ✔ | ✔ |
billing_company_bank_name | string | Name of the bank (in the case of corporate clients) | ✔ | ✔ |
billing_company_bank_account | string | Bank account (in case of clients legal entities) | ✔ | ✔ |
billing_country_code | string | Billing Data Country Code (ISO 3166-1 alpha-2) | ✔ | ✔ |
billing_country_name | string | Country name for billing data | ✔ | ✔ |
billing_state | string | County or state related to billing data | ✔ | ✔ |
billing_city | string | The city related to the billing data | ✔ | ✔ |
billing_address | string | Billing data address | ✔ | ✔ |
billing_postal_code | string | Postal code for billing information | ✔ | ✔ |
billing_phone | string | Phone number for billing information | ✔ | ✔ |
shipping_name | string | The person designated to receive the order | ✔ | ✔ |
shipping_country_code | string | Country code for delivery purposes (ISO 3166-1 alpha-2) | ✔ | ✔ |
shipping_country_name | string | Country name for delivery purposes | ✔ | ✔ |
shipping_state | string | County or state for delivery purposes | ✔ | ✔ |
shipping_city | string | City for delivery purposes | ✔ | ✔ |
shipping_address | string | Address for delivery purposes | ✔ | ✔ |
shipping_postal_code | string | Postal code for delivery purposes | ✔ | ✔ |
shipping_phone | string | Phone number for delivery purposes | ✔ | ✔ |
line_items | array | List of ordered products | ✔ | |
TIP
Any field returned that is not documented can be ignored because it is not yet available.
Extract order list
Shows filtered list of records.
Type : Resource list
Method : GET
Url : /api/v2/orders
Filter results : Yes
Field selection : Yes
Include additional fields : Yes
Pagination : Yes
The http response code is 200
successful, the response will take the form of a list of resources related to the defined filters.
Only the list type fields will be included in the standard result. You can include additional fields that are not included by default using the parameter include
and explicitly mentioning only the additional fields (separated by commas) that you want included.
GET /api/v2/orders?include=line_items
You can filter the fields you want included in the result for each resource using the parameter fields
and explicitly mentioning only the fields (separated by commas) you want included (the field id
will always be included by default).
GET /api/v2/orders?fields=id,payment_status,shipping_status,total_amount
Filter results
It is possible to filter the results by appending some specific parameters in the URL.
Parameter | Description | Example |
---|---|---|
id | The order id | id = 101 |
IFS | Comma-separated list of category ids | ids=12345001,12345002,12345003 |
payment_status | Payment status | payment_status=awaiting |
payment_substatus_id | The ID of the payment substatus | payment_substatus_id=11 |
payment_method_code | Payment method code | payment_method_code=cash_delivery |
payment_transaction_id | The reference identifier of the payment | payment_transaction_id=VADE0B248932 |
shipping_status | Delivery status | shipping_status=awaiting |
shipping_substatus_id | The delivery substatus ID | shipping_substatus_id=21 |
shipping_method_id | The ID of the delivery method | shipping_method_id=101 |
shipping_awb | AWB code from the courier's system | shipping_awb=12312345675 |
customer_id | Customer ID | customer_id=12345 |
customer_email | The customer's email address | customer_email=john.smith@example.com |
created_after | Date from which records were created (ISO 8601 format) | created_after=2019-01-01 |
created_before | Date up to which records were created (ISO 8601 format) | created_before=2020-01-01 |
tag_name | The name of the tag | tag_name=value |
tag_ids | Comma separated list of tag ids | tag_ids=123,456 |
GET /api/v2/orders?ids=12345001,12345002,12345003
Sort results
It is possible to sort the results by appending some specific parameters in the URL.
Parameter | Description | Example |
---|---|---|
data_created | Order date, ascending | sort=date_created |
date_created.desc | Order date, descending | sort=date_created.desc |
GET /api/v2/orders?sort=date_created
Pagination
Pagination parameters can be added to the API request to limit the number of entries per page and access all available pages.
Parameter | Type | Default |
---|---|---|
start | int | 0 |
limit | int | 100 |
The maximum number of records per page cannot exceed 100.
GET /api/v2/orders?start=100&limit=100
Request format
Example of a CURL request that extracts all records:
curl --request GET \
--url 'https://shop.demo.bg/api/v2/orders' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}'
Filters records based on delivery status, extracts all fields
Request example
GET /api/v2/orders?shipping_status=awaiting
Response example
{
"data": [
{
"id": 11089919,
"payment_status": "awaiting",
"payment_status_text": "Plata in asteptare",
"payment_method_code": "cash_delivery",
"payment_method_name": "Plata in sistem ramburs",
"shipping_status": "awaiting",
"shipping_status_text": "Comanda in asteptare",
"shipping_method_id": 3,
"shipping_method_name": "Speedy",
"shipping_amount": 15,
"shipping_tax_amount": 2.39,
"total_amount": 30.23,
"currency": "RON",
"customer_id": 14,
"customer_email": "john.smith@yahoo.com",
"customer_ip_address": "166.176.119.218",
"customer_ip_country": "RO",
"customer_device": "desktop",
"customer_lang": "ro_RO",
"customer_note": null,
"customer_notification": null,
"date_created": "2019-12-05T16:11:23+02:00",
"date_modified": "2019-12-05T16:11:23+02:00",
"created_by": "customer",
"meta_fields": null,
"tags": null,
"billing_type": "individual",
"billing_name": "John Smith",
"billing_company_name": null,
"billing_company_number": null,
"billing_company_vat": null,
"billing_company_bank_name": null,
"billing_company_bank_account": null,
"billing_country_code": "RO",
"billing_country_name": "România",
"billing_state": "Bucuresti",
"billing_city": "Bucuresti",
"billing_address": "str Rose Hill, nr. 45",
"billing_postal_code": "100167",
"billing_phone": "0722356158",
"shipping_name": "John Smith",
"shipping_country_code": "RO",
"shipping_country_name": "România",
"shipping_state": "Bucuresti",
"shipping_city": "Bucuresti",
"shipping_address": "str Rose Hill, nr. 45",
"shipping_postal_code": "100167",
"shipping_phone": "0722356158",
"invoice": null,
"Info_url": "https://shop.demo.ro/comanda/info/33a818fcb3a13aa5b70e3a9e1475bfc0/11089919",
"proforma_url": "https://shop.demo.ro/comanda/proforma/33a818fcb3a13aa5b70e3a9e1475bfc0/11089919"
}
],
"meta": {
"count": {
"total": 1,
"current": 1,
"start": 0,
"limit": 100
},
"links": {
"prev": null,
"current": "/api/v2/orders?shipping_status=awaiting",
"next": null
}
}
}
Filter the records based on the list of IDs, filter only certain fields
Request example
GET /api/v2/orders?ids=12345001,12345002,12345003&fields=id,payment_status,payment_method_code,total_amount
Response example
{
"data": [
{
"id": 12345001,
"payment_status": "awaiting",
"payment_method_code": "cash_delivery",
"total_amount": 999.95
},
{
"id": 12345002,
"payment_status": "paid",
"payment_method_code": "paypal",
"total_amount": 199.99
},
{
"id": 12345003,
"payment_status": "cancelled",
"payment_method_code": "cash_delivery",
"total_amount": 599.97
}
],
"meta": {
"count": {
"total": 3,
"current": 3,
"start": 0,
"limit": 100
},
"links": {
"prev": null,
"current": "/api/v2/orders?ids=12345001,12345002,12345003&fields=id,payment_status,payment_method_code,total_amount",
"next": null
}
}
}
Filters records based on delivery status, includes additional fields
Request example
GET /api/v2/orders?shipping_status=awaiting&include=line_items
Response example
{
"data": [
{
"id": 64098294,
"payment_status": "awaiting",
"payment_status_text": "Plata in asteptare",
"payment_method_code": "cash_delivery",
"payment_method_name": "Plata in sistem ramburs",
"shipping_status": "awaiting",
"shipping_status_text": "Comanda in asteptare",
"shipping_method_id": 3,
"shipping_method_name": "Speedy",
"shipping_amount": 161.16,
"shipping_tax_amount": 25.73,
"total_amount": 526.55,
"currency": "RON",
"customer_id": 19,
"customer_email": "john.smith@yahoo.com",
"customer_ip_address": "143.20.218.217",
"customer_ip_country": "ro",
"customer_device": "desktop",
"customer_lang": "ro_RO",
"customer_note": null,
"customer_notification": null,
"date_created": "2020-03-26T15:47:08+02:00",
"date_modified": "2020-03-26T15:47:08+02:00",
"created_by": "customer",
"meta_fields": null,
"tags": null,
"billing_type": "individual",
"billing_name": "John Smith",
"billing_company_name": null,
"billing_company_number": null,
"billing_company_vat": null,
"billing_company_bank_name": null,
"billing_company_bank_account": null,
"billing_country_code": "RO",
"billing_country_name": "România",
"billing_state": "Bucuresti",
"billing_city": "Bucuresti",
"billing_address": "str Rose Hill, nr. 45",
"billing_postal_code": "1221421",
"billing_phone": "0722654983",
"shipping_name": "John Smith",
"shipping_country_code": "RO",
"shipping_country_name": "România",
"shipping_state": "Bucuresti",
"shipping_city": "Bucuresti",
"shipping_address": "str Rose Hill, nr. 45",
"shipping_postal_code": "1221421",
"shipping_phone": "0722654983",
"line_items": [
{
"item_type": "product",
"product_id": 1958,
"variant_name": "Culoare: alb",
"variant_options": [
{
"id": 1,
"name": "Culoare",
"value": "alb"
},
],
"product_sku": "3484",
"product_ean": "7562461441110",
"product_name": "Massive Menelaus 37511/48/10",
"product_url": "https://shop.demo.ro/cumpara?id=1958",
"product_image_url": "https://shop.demo.ro/files/s11/204992628/p/l/7/massive-menelaus-37511-48-10-lustra~1057.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 2,
"category_name": "Lustre",
"manufacturer_id": 0,
"quantity": 1,
"unit_price_net": 307.05,
"unit_tax_amount": 58.34,
"unit_price_gross": 365.39,
"line_subtotal_net": 307.05,
"line_tax_amount": 58.34,
"line_subtotal_gross": 365.39,
}
],
"invoice": null,
"info_url": "https://shop.demo.ro/comanda/info/6c1d81789f477768caad874aafc24936/64098294",
"proforma_url": "https://shop.demo.ro/comanda/proforma/6c1d81789f477768caad874aafc24936/64098294"
}
],
"meta": {
"count": {
"total": 1,
"current": 1,
"start": 0,
"limit": 100
},
"links": {
"prev": null,
"current": "/api/v2/orders?shipping_status=awaiting&include=line_items",
"next": null
}
}
}
Order data extraction
It displays the data of a single record.
Type : Individual resource
Method : GET
Url : /api/v2/orders/{id}
Filter results : No
Field selection : Yes
Inclusion of additional fields : No
Pagination : No
The http response code is 200
in case of success, the response will have the form of an individual resource related to the requested id.
You can filter the fields you want included in the result for each resource using the parameter fields
and explicitly mentioning only the fields (separated by commas) you want included (the id field will always be included by default).
GET /api/v2/orders/{id}?fields=id,total_amount,line_items
Request format
Example of a CURL request that returns an individual record:
curl --request GET \
--url 'https://shop.demo.ro/api/v2/orders/12345001' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}'
Extract all fields
Request example
GET /api/v2/orders/{id}
Response example
{
"id": 12345001,
"parent_id": 39787708,
"payment_status": "awaiting",
"payment_status_text": "Plata in asteptare",
"payment_method_code": "cash_delivery",
"payment_method_name": "Plata in sistem ramburs",
"shipping_status": "awaiting",
"shipping_status_text": "Comanda in asteptare",
"shipping_method_id": 0,
"shipping_method_name": null,
"shipping_amount": null,
"shipping_tax_amount": null,
"total_amount": 453.05,
"currency": "RON",
"customer_id": 2,
"customer_email": "dfdfddddf@exemple.com",
"customer_ip_address": "",
"customer_ip_country": "",
"customer_device": "manual",
"customer_lang": "ro_RO",
"customer_note": null,
"customer_notification": null,
"date_created": "2020-03-25T07:42:28+02:00",
"date_modified": "2020-03-25T07:42:28+02:00",
"created_by": "account",
"meta_fields": null,
"tags": null,
"billing_type": "individual",
"billing_name": "John Smith",
"billing_company_name": null,
"billing_company_number": null,
"billing_company_vat": null,
"billing_company_bank_name": null,
"billing_company_bank_account": null,
"billing_country_code": "RO",
"billing_country_name": "România",
"billing_state": "Bacau",
"billing_city": "bacau",
"billing_address": "",
"billing_postal_code": "",
"billing_phone": "",
"shipping_name": "John Smith",
"shipping_country_code": "RO",
"shipping_country_name": "România",
"shipping_state": "Bacau",
"shipping_city": "bacau",
"shipping_address": "",
"shipping_postal_code": "",
"shipping_phone": "",
"line_items": [
{
"item_type": "product",
"product_id": 259,
"product_sku": null,
"product_ean": null,
"product_name": "Giuseppe Zanotti Women's Swarovski Sandal",
"product_url": "https://shop.demo.ro/cumpara?id=259",
"product_image_url": "https://s.cdnmpro.com/272414248/p/l/7/giuseppe-zanotti-women-s-swarovski-sandal~27.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 18,
"category_name": "Sandale",
"manufacturer_id": 1000050,
"manufacturer_name": "Giuseppe-Zanotti",
"quantity": 1,
"unit_price_net": 184.03,
"unit_tax_amount": 34.96,
"unit_price_gross": 218.99,
"line_subtotal_net": 184.03,
"line_tax_amount": 34.96,
"line_subtotal_gross": 218.99
},
{
"item_type": "product",
"product_id": 260,
"product_sku": null,
"product_ean": null,
"product_name": "Women's Nunaked Dress Sandal",
"product_url": "https://shop.demo.ro/cumpara?id=260",
"product_image_url": "https://s.cdnmpro.com/272414248/p/l/9/women-s-nunaked-dress-sandal~29.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 18,
"category_name": "Sandale",
"manufacturer_id": 1000061,
"manufacturer_name": "Joop",
"quantity": 2,
"unit_price_net": 98.34,
"unit_tax_amount": 18.69,
"unit_price_gross": 117.03,
"line_subtotal_net": 196.68,
"line_tax_amount": 37.38,
"line_subtotal_gross": 234.06
}
],
"invoice": {
"prefix": "SERIE",
"number": "0000010",
"app": "billing",
"cancelled": false,
"url": "https://shop.demo.ro/comanda/invoice/2e8b8a4802eb3b5d1c8f381b2c20a0ea/52527708"
},
"info_url": "https://shop.demo.ro/comanda/info/557d2803bc4caee040329d1de5d2754f/12345001",
"proforma_url": "https://shop.demo.ro/comanda/proforma/557d2803bc4caee040329d1de5d2754f/12345001"
}
Filter only certain fields
Request example
GET /api/v2/orders/{id}?fields=id,payment_status,shipping_status,total_amount
Response example
{
"data": [
{
"id": 12345001,
"payment_status": "awaiting",
"shipping_status": "awaiting",
"total_amount": 453.05
},
{
"id": 39787708,
"payment_status": "cancelled",
"shipping_status": "cancelled",
"total_amount": 1712.05
},
{
"id": 46706210,
"payment_status": "failed",
"shipping_status": "awaiting",
"total_amount": 1799
},
{
"id": 53824910,
"payment_status": "awaiting",
"shipping_status": "shipped",
"total_amount": 467.99
},
{
"id": 67716435,
"payment_status": "paid",
"shipping_status": "in_process",
"total_amount": 1719
},
{
"id": 73000828,
"payment_status": "awaiting",
"shipping_status": "awaiting",
"total_amount": 1900
},
{
"id": 93950143,
"payment_status": "paid",
"shipping_status": "delivered",
"total_amount": 503.99
}
],
"meta": {
"count": {
"total": 7,
"current": 7,
"start": 0,
"limit": 20
},
"links": {
"prev": null,
"current": "/api/v2/orders?fields=id,payment_status,shipping_status,total_amount",
"next": null
}
}
}
Add an order
Allows adding a new record.
Type : Create resource
Method : POST
Url :/api/v2/orders
The http response code is 200
in case of success, the response will have the form of an individual resource representing the record that was just added.
Request format
Example of a CURL request that creates a new order:
curl --request POST \
--url 'https://shop.demo.ro/api/v2/orders' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}' \
--data-raw '{
"payment_status": "awaiting",
"payment_method_code": "cash_delivery",
"shipping_status": "awaiting",
"shipping_method_id": 0,
"shipping_amount": null,
"customer_id": 17,
"customer_email": "sdsdsdsdsdsdsd@example.com",
"billing_type": "individual",
"billing_name": "John Smith",
"billing_country_code": "RO",
"billing_country_name": "România",
"shipping_name": "John Smith",
"shipping_country_code": "RO",
"shipping_country_name": "Romania",
"shipping_state": "Bucuresti",
"shipping_city": "Bucuresti",
"line_items": [
{
"item_type": "product",
"product_id": 5087,
"variant_id": 10004461,
"variant_name": "Size: 39",
"variant_options": [
{
"id": 27884,
"name": "Size",
"value": "39"
}
],
"family_sku": "V01 nude pu",
"product_sku": "V01 nude pu 39",
"product_ean": null,
"product_name": "Shoes Inko Nude 2",
"product_url": "https://shop.demo.ro/cumpara?id=5087",
"product_image_url": "https://shm-cdn.v1.ro/199135886/p/l/7/pantofi-inko-nude-2~4987.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 6,
"category_name": "Shoes",
"manufacturer_id": 0,
"quantity": 1,
"unit_price_net": 91.6,
"unit_tax_amount": 17.4,
"unit_price_gross": 109,
"line_subtotal_net": 91.6,
"line_tax_amount": 17.4,
"line_subtotal_gross": 109,
"meta_fields": {
"prod_id_ref": "7777060"
}
},
{
"item_type": "product",
"product_id": 5088,
"variant_id": 10002901,
"variant_name": "Size: 35",
"variant_options": [
{
"id": 27884,
"name": "Size",
"value": "35"
}
],
"family_sku": "JA-1388-C BEIGE 2",
"product_sku": "JA-1388-C BEIGE 2 35",
"product_ean": null,
"product_name": "Shoes Gabel Beige 2",
"product_url": "https://shop.demo.ro/cumpara?id=5088",
"product_image_url": "https://shm-cdn.v1.ro/199135886/p/l/8/pantofi-gabel-bej-2~4988.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 6,
"category_name": "Shoes",
"manufacturer_id": 0,
"quantity": 1,
"unit_price_net": 57.98,
"unit_tax_amount": 11.02,
"unit_price_gross": 69,
"line_subtotal_net": 57.98,
"line_tax_amount": 11.02,
"line_subtotal_gross": 69,
"meta_fields": {
"prod_id_ref": "7777061"
}
}
]
}'
Add an order
Request example
POST /api/v2/orders
{
"payment_status": "awaiting",
"payment_method_code": "cash_delivery",
"shipping_status": "awaiting",
"shipping_method_id": 0,
"shipping_amount": null,
"customer_id": 17,
"customer_email": "sdsdsdsdsdsdsd@example.com",
"billing_type": "individual",
"billing_name": "John Smith",
"billing_country_code": "RO",
"billing_country_name": "România",
"shipping_name": "John Smith",
"shipping_country_code": "RO",
"shipping_country_name": "Romania",
"shipping_state": "Bucuresti",
"shipping_city": "Bucuresti",
"line_items": [
{
"item_type": "product",
"product_id": 5087,
"variant_id": 10004461,
"variant_name": "Size: 39",
"variant_options": [
{
"id": 27884,
"name": "Size",
"value": "39"
}
],
"family_sku": "V01 nude pu",
"product_sku": "V01 nude pu 39",
"product_ean": null,
"product_name": "Shoes Inko Nude 2",
"product_url": "https://shop.demo.ro/cumpara?id=5087",
"product_image_url": "https://shm-cdn.v1.ro/199135886/p/l/7/pantofi-inko-nude-2~4987.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 6,
"category_name": "Shoes",
"manufacturer_id": 0,
"quantity": 1,
"unit_price_net": 91.6,
"unit_tax_amount": 17.4,
"unit_price_gross": 109,
"line_subtotal_net": 91.6,
"line_tax_amount": 17.4,
"line_subtotal_gross": 109,
"meta_fields": {
"prod_id_ref": "7777060"
}
},
{
"item_type": "product",
"product_id": 5088,
"variant_id": 10002901,
"variant_name": "Size: 35",
"variant_options": [
{
"id": 27884,
"name": "Size",
"value": "35"
}
],
"family_sku": "JA-1388-C BEIGE 2",
"product_sku": "JA-1388-C BEIGE 2 35",
"product_ean": null,
"product_name": "Shoes Gabel Beige 2",
"product_url": "https://shop.demo.ro/cumpara?id=5088",
"product_image_url": "https://shm-cdn.v1.ro/199135886/p/l/8/pantofi-gabel-bej-2~4988.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 6,
"category_name": "Shoes",
"manufacturer_id": 0,
"quantity": 1,
"unit_price_net": 57.98,
"unit_tax_amount": 11.02,
"unit_price_gross": 69,
"line_subtotal_net": 57.98,
"line_tax_amount": 11.02,
"line_subtotal_gross": 69,
"meta_fields": {
"prod_id_ref": "7777061"
}
}
]
}
Response example
{
"id": 69291306,
"payment_status": "awaiting",
"payment_status_text": "Plata in asteptare",
"payment_method_code": "cash_delivery",
"payment_method_name": "Plata in sistem ramburs",
"shipping_status": "awaiting",
"shipping_status_text": "Comanda in asteptare",
"shipping_method_id": 0,
"shipping_method_name": null,
"shipping_amount": null,
"shipping_tax_amount": null,
"total_amount": 178,
"currency": "RON",
"customer_id": 17,
"customer_email": "sdsdsdsdsdsdsd@example.com",
"customer_ip_address": "",
"customer_ip_country": "",
"customer_device": "desktop",
"customer_lang": null,
"customer_note": null,
"customer_notification": null,
"date_created": "2020-05-05T10:04:54+03:00",
"date_modified": "2020-05-05T10:04:54+03:00",
"created_by": "customer",
"meta_fields": null,
"tags": null,
"billing_type": "individual",
"billing_name": "John Smith",
"billing_company_name": null,
"billing_company_number": null,
"billing_company_vat": null,
"billing_company_bank_name": null,
"billing_company_bank_account": null,
"billing_country_code": "RO",
"billing_country_name": "România",
"billing_state": "Bucuresti",
"billing_city": "Bucuresti",
"billing_address": "",
"billing_postal_code": "1000",
"billing_phone": "",
"shipping_name": "John Smith",
"shipping_country_code": "RO",
"shipping_country_name": "România",
"shipping_state": "Bucuresti",
"shipping_city": "Bucuresti",
"shipping_address": null,
"shipping_postal_code": null,
"shipping_phone": null,
"line_items": [
{
"product_id": 5087,
"variant_id": 10004461,
"family_sku": "V01 nude pu",
"product_sku": "V01 nude pu 39",
"product_ean": null,
"product_name": "Shoes Inko Nude 2",
"product_url": "https://shop.demo.ro/cumpara?id=5087",
"product_image_url": "https://shm-cdn.v1.ro/199135886/p/l/7/pantofi-inko-nude-2~4987.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 6,
"category_name": "Shoes",
"manufacturer_id": 0,
"quantity": 1,
"unit_price_net": 91.6,
"unit_tax_amount": 17.4,
"unit_price_gross": 109,
"line_subtotal_net": 91.6,
"line_tax_amount": 17.4,
"line_subtotal_gross": 109,
"meta_fields": {
"prod_id_ref": "7777060"
}
},
{
"product_id": 5088,
"variant_id": 10002901,
"family_sku": "JA-1388-C BEIGE 2",
"product_sku": "JA-1388-C BEIGE 2 35",
"product_ean": null,
"product_name": "Shoes Gabel Beige 2",
"product_url": "https://shop.demo.ro/cumpara?id=5088",
"product_image_url": "https://shm-cdn.v1.ro/199135886/p/l/8/pantofi-gabel-bej-2~4988.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 6,
"category_name": "Shoes",
"manufacturer_id": 0,
"quantity": 1,
"unit_price_net": 57.98,
"unit_tax_amount": 11.02,
"unit_price_gross": 69,
"line_subtotal_net": 57.98,
"line_tax_amount": 11.02,
"line_subtotal_gross": 69,
"meta_fields": {
"prod_id_ref": "7777061"
}
}
],
"invoice": null,
"info_url": "https://shop.demo.ro/comanda/info/f3b941970c87ce44033586413c2dec92/69291306",
"proforma_url": "https://shop.demo.ro/comanda/proforma/f3b941970c87ce44033586413c2dec92/69291306"
}
Modification of order data
Allows updating an existing record based on ID.
Type : Resource update
Method : PATCH
Url :/api/v2/orders/{id}
The http response code is 200
in case of success, the response will have the form of an individual resource representing the record that has just been updated.
Request format
Example of a CURL request that updates an existing record:
curl --request PATCH \
--url 'https://shop.demo.ro/api/v2/orders/12345001' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}' \
--data-raw '{
"shipping_method_id": 101,
"shipping_amount": 15
}'
Order data update
Request example
PATCH /api/v2/orders/{id}
{
"shipping_method_id": 101,
"shipping_amount": 15,
"tags": [
{
"name": "Excelent feedback"
}
]
}
Response example
{
"id": 12345001,
"parent_id": 61001305,
"payment_status": "cancelled",
"payment_status_text": "Plata anulata",
"payment_method_code": "cash_delivery",
"payment_method_name": "Plata in sistem ramburs",
"shipping_status": "cancelled",
"shipping_status_text": "Comanda anulata",
"shipping_method_id": 101,
"shipping_method_name": null,
"shipping_amount": 15,
"shipping_tax_amount": 0,
"total_amount": 13394.85,
"currency": "RON",
"customer_id": 3,
"customer_email": "234242424242@example.net",
"customer_ip_address": "95.77.99.177",
"customer_ip_country": "RO",
"customer_device": "desktop",
"customer_lang": "ro_RO",
"customer_note": null,
"customer_notification": "",
"date_created": "2020-01-13T13:34:15+02:00",
"date_modified": "2020-05-02T10:50:12+03:00",
"created_by": "customer",
"meta_fields": null,
"tags": [
{
"id": 1,
"name": "Feedback excelent"
}
],
"billing_type": "individual",
"billing_name": "John Smith",
"billing_company_name": null,
"billing_company_number": null,
"billing_company_vat": null,
"billing_company_bank_name": null,
"billing_company_bank_account": null,
"billing_country_code": "RO",
"billing_country_name": "România",
"billing_state": "Bucuresti",
"billing_city": "Bucuresti",
"billing_address": "str Rose Hill, nr. 45",
"billing_postal_code": "",
"billing_phone": "0212112121",
"shipping_name": "John Smith",
"shipping_country_code": "RO",
"shipping_country_name": "România",
"shipping_state": "Bucuresti",
"shipping_city": "Bucuresti",
"shipping_address": "str Rose Hill, nr. 45",
"shipping_postal_code": "",
"shipping_phone": "0212112121",
"line_items": [
{
"item_type": "product",
"product_id": 53,
"product_sku": null,
"product_ean": null,
"product_name": "Floral Laser Suede Dress",
"product_url": "https://shop.demo.ro/cumpara?id=53",
"product_image_url": "https://shm-cdn.v1.ro/283342624/p/l/9/floral-laser-suede-dress~169.jpg",
"product_tax_name": "TVA",
"product_tax_percent": 19,
"category_id": 9,
"category_name": "Rochii",
"manufacturer_id": 1000017,
"manufacturer_name": "Michael Kors",
"quantity": 15,
"unit_price_net": 891.99,
"unit_tax_amount": 0,
"unit_price_gross": 891.99,
"line_subtotal_net": 13379.85,
"line_tax_amount": 0,
"line_subtotal_gross": 13379.85
}
],
"invoice": {
"prefix": "SERIE",
"number": "0000010",
"app": "billing",
"cancelled": false,
"url": "https://shop.demo.ro/comanda/invoice/2e8b8a4802eb3b5d1c8f381b2c20a0ea/52527708"
},
"info_url": "https://shop.demo.ro/comanda/info/6962541174d3099d2dc6b0cd902d3601/12345001",
"proforma_url": "https://shop.demo.ro/comanda/proforma/6962541174d3099d2dc6b0cd902d3601/12345001"
}
Order processing
Allows processing of an existing record based on ID.
Type : Resource update
Method : PATCH
Url :/api/v2/orders/{id}/{request_handler}
The http response code is 200
in case of success.
Change delivery status (order in processing)
Request example
PATCH /api/v2/orders/{id}/in_process
Response example
{
"ok": true
}
Change delivery status (order shipped)
Request example
PATCH /api/v2/orders/{id}/shipped
Response example
{
"ok": true
}
Change delivery status (order delivered)
Request example
PATCH /api/v2/orders/{id}/delivered
Response example
{
"ok": true
}
Change of delivery status (order returned)
Request example
PATCH /api/v2/orders/{id}/returned
Response example
{
"ok": true
}
Cancel order
Request example
PATCH /api/v2/orders/{id}/cancelled
Response example
{
"ok": true
}
Issue the invoice
Request example
PATCH /api/v2/orders/{id}/create_invoice
Resonse example
{
"ok": true
}
Delete an order
Allows deletion of an existing record based on ID.
Type : Delete resource
Method : DELETE
Url :/api/v2/orders/{id}
The http response code is 200
in case of success, the response will have the form of an individual resource representing the record that was just deleted.
Request format
Example of a CURL request that deletes an existing record:
curl --request DELETE \
--url 'https://shop.demo.ro/api/v2/orders/12345001' \
--header 'Accept: application/json' \
--header 'Content-type: application/json' \
--header 'Authorization: Basic {base64-encoded-credentials}'
Delete the order together with all its related data
Request example
DELETE /api/v2/orders/{id}
Response example
{
"ok": true
}