Introduction
Welcome to the International Design Customer API! You can use our API to access our Customer API endpoints.
We have language binding in Python! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Production endpoint: https://desk-beta.international-design.pro/api/method/international_design.customer_api
Sandbox endpoint: https://sandbox.international-design.pro/api/method/international_design.customer_api
Authentication
To authorize, use this code:
import requests as rq
headers = {'Authorization': 'token api_key:api_secret'}
url = 'https://desk-beta.international-design.pro/api/method/international_design.customer_api'
res = rq.get(url, headers=headers)
Make sure to replace
api_keyandapi_secretwith your corresponding credentials.
ID Customer API use token base Auth access to the API. You can register a new API key by contacting ou technical team at admin@international-design.pro
The API expects the token to be provided in each call within the Authorization Header
Authorization: token api_key:api_secret
Sales Order
Create Sales Order
import requests as rq
import json
headers = {'Authorization': 'token api_key:api_secret'}
url = 'https://desk-beta.international-design.pro/api/method/international_design.customer_api.selling.sales_order'
# see below json data example
res = rq.post(url, data=json.dumps(data), headers=headers)
The above command accept JSON structured like this:
{
"customer": "CLT-00465",
"po_no": "AHEBSXU",
"transaction_date": "2020-08-10",
"items": [
{
"item_code": "27354BL",
"qty": 2
},
{
"item_code": "58219GA",
"qty": 2
}
],
"dropshipping": 1,
"dropshipping_service": "PREMIUM",
"shipping_address": {
"full_name": "Jean Dupont",
"email": "jean.dupont@gmail.com",
"phone": "+33678934754",
"address_line1": "60 rue ampere",
"address_line2": "International Design",
"pincode": "77400",
"city": "Lagny Sur Marne",
"country": "France"
}
}
This endpoint create new sales order.
HTTP Request
POST https://desk-beta.international-design.pro/api/method/international_design.customer_api.selling.sales_order
Query Parameters
| Parameter | Parent | Mandatory | Description |
|---|---|---|---|
| customer | root | false if single customer else true | your customer code, if you have only one customer registered within our system it will be automaticaly set otherwhise you will have to provide it |
| transaction_date | root | true | date of transaction in format yyyy-mm-dd |
| po_no | root | true | unique identifier of the sales order |
| dropshipping | root | true | 1 for dropshipping to the end customer else 0. If you want to use the dropshipping service please contact our team |
| dropshipping_service | root | false | 'BASIC' or 'PREMIUM' according to which shipping you want to offer to your customer. 'PREMIUM' by default if no service provided. See costs in your product feed or contact our team for more informations |
| items | root | true | list of items with quantity |
| item_code | items | true | item sku of the line item |
| qty | items | true | qty of the line item |
| shipping_address | root | true if dropshipping else false | shipping address and info of the end customer |
| full_name | shipping_address | true | end customer full name |
| shipping_address | true | end customer email | |
| phone | shipping_address | true | end customer phone |
| address_line1 | shipping_address | true | end customer address_line1 |
| address_line2 | shipping_address | false | end customer address_line2 |
| city | shipping_address | true | end customer city |
| pincode | shipping_address | true | end customer pincode |
| country | shipping_address | true | end customer country |
Get Tracking URL
import requests as rq
import json
headers = {'Authorization': 'token api_key:api_secret'}
url = 'https://desk-beta.international-design.pro/api/method/international_design.customer_api.selling.tracking'
params = {'po_no': "SALES_ORDER_REF"}
res = rq.get(url, params=params, headers=headers)
This endpoint retrieve the tracking URL linked to the Sales Order Ref provided.
HTTP Request
GET https://desk-beta.international-design.pro/api/method/international_design.customer_api.selling.tracking?po_no={SALES_ORDER_REF}
Query Parameters
| Parameter | Parent | Mandatory | Description |
|---|---|---|---|
| po_no | root | true | unique identifier of the sales order |
Get Shipping Cost
import requests as rq
import json
headers = {'Authorization': 'token api_key:api_secret'}
url = 'https://desk-beta.international-design.pro/api/method/international_design.customer_api.selling.shipping_cost'
# see below json data example
res = rq.post(url, data=json.dumps(data), headers=headers)
The above command accept JSON structured like this:
{
"dropshipping_service": "BASIC",
"items": [
{
"item_code": "27354BL",
"qty": 2
},
{
"item_code": "23813NA",
"qty": 1
},
{
"item_code": "12751TA",
"qty": 1
}
],
"shipping_address": {
"full_name": "Jean Dupont",
"address_line1": "60 rue ampere",
"address_line2": "International Design",
"pincode": "77400",
"city": "Lagny Sur Marne",
"country": "France"
}
}
The above request return the response below
{
"message": {
"GLS": {
"line_items": [
{
"item_code": "27354BL",
"qty": 2
}
],
"shipping_price": 16,
"service": "BASIC"
},
"AGEDISS": {
"line_items": [
{
"item_code": "23813NA",
"qty": 1
},
{
"item_code": "12751TA",
"qty": 1
}
],
"shipping_price": 63.0,
"service": "BASIC"
},
"total_shipping_price": 79.0
}
}
This endpoint retrieve the dropshipping cost of the item to the provided address with the provided service.
HTTP Request
POST https://desk-beta.international-design.pro/api/method/international_design.customer_api.selling.shipping_cost
Query Parameters
| Parameter | Parent | Mandatory | Description |
|---|---|---|---|
| dropshipping_service | root | false | 'BASIC' or 'PREMIUM' according to which shipping you want to offer to your customer. 'PREMIUM' by default if no service provided. See costs in your product feed or contact our team for more informations |
| items | root | true | list of items with quantity |
| item_code | items | true | item sku of the line item |
| qty | items | true | qty of the line item |
| shipping_address | root | true | shipping address and info of the end customer |
| full_name | shipping_address | true | end customer full name |
| address_line1 | shipping_address | true | end customer address_line1 |
| city | shipping_address | true | end customer city |
| pincode | shipping_address | true | end customer pincode |
| country | shipping_address | true | end customer country |