Close
logo

Order Routing Pipe

Git RepositoryEdit on Github
Last update: 9 months ago by Francesco de LorenziReading time: 2 min

When finalizing orders, Jetti allows you to dynamically route them based on an initial Dropship Provider and a list of sale items along with their quantity. The API endpoint will need to respond with one dropshipProviderId.

The Order Routing API pipeline configuration is available in the channel configuration page under Integrations -> platform icon -> store name -> Order Processing.

After ticking the Custom order routing API, you will be able to enter the Order routing endpoint URL.

Jetti will send a JSON payload which corresponds to the following JSON schema:

{
"type": "object",
"required": [
"batches"
],
"properties": {
"batches": {
"type": "array",
"items": {
"type": "object",
"required": [
"dropshipProviderId",
"saleItemIds"
],
"properties": {
"saleItemIds": {
"type": "array",
"items": {
"type": "object",
"required": [
"saleItemId",
"quantity"
],
"properties": {
"quantity": {
"type": "integer"
},
"saleItemId": {
"type": "integer"
}
}
}
},
"dropshipProviderId": {
"type": "integer"
}
}
}
}
},
"additionalProperties": false
}

Here is an example JSON payload that Jetti will send:

{
"batches": [
{
"dropshipProviderId": 44830166,
"saleItemIds": [
{
"saleItemId": 75863028,
"quantity": 3
}
]
},
{
"dropshipProviderId": 3589889,
"saleItemIds": [
{
"saleItemId": 40989775,
"quantity": 4
}
]
}
]
}

Jetti will expect a response which needs to be valid according to the following JSON schema:

{
"type": "object",
"properties": {
"dropshipProviderId": {
"type": "integer"
}
},
"required": [
"dropshipProviderId"
]
}

Below is an example JSON response that Jetti considers valid:

{
"dropshipProviderId": 12352
}
๐Ÿ” API Pipeline โ€” Previous
Dropshipment Pipe
Next โ€” ๐Ÿ” API Pipeline
Order Splitting Pipe