It is possible to use the query endpoint to find orders that match certain conditions. The endpoint could be used to import orders that have a specific status and that have been changed after a specific time.
An example of this type of query is shown below. All orders that match lastModified>2020-12-22T06:24:57Z AND orderSatus="completed" will be returned.
Check the API-reference for more information about available query fields. The fields are documented in the model.
Endpoint
POST /product/query
Example query to find a set of orders that match all conditions:
{
"filter": {
"type":"and",
"subclauses":[
{
"type": "gt",
"field": "lastModified",
"value": {
"type": "datetime",
"value": "2020-12-22T06:24:57Z"
}
},
{
"type": "eq",
"field": "orderStatus",
"value": {
"type": "str",
"value": "completed"
}
}
]
}
}
Response will be an array of products.
Example response:
[
{
"localId": "0006463d034d595774bf76d0311a21be",
"remoteId": "x",
"....":"....."
},{
"localId": "3fb2568eb7e165e34dd311af5550002b",
"remoteId": "y",
"....":"....."
}
]
Kommentarer
0 kommentarer
Artikeln är stängd för kommentarer.