Colizey - Accept Orders
Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)
Date | Version | Comment |
---|---|---|
08/09/2022 | 1.1 | statuses changed due to discussion on the estimation |
The purpose of this document is to describe in details the process of accepting orders.
By default, we accept all orders.
To accept an order, we should push the order ID, which we received in List Order response and stored in Orders > Marketplace Order ID.
We are able to accept only paid orders, i.e. the internal tool status of the order should be “Pending“ , Is Acknowledged = “Pending“
If we send the API call to unpaid order, then we will receive an error. We should store this error in Order error table and the error to indicate we are not able to accept the order because it is not paid ( Error message: “The order is unpaid.“).
As per performed tests, buyer is not able to cancel order which was already accepted.
API Call: POST https://api.colizey.fr/merchant/orders/{orderId}/accept
API Docs: https://apidoc.colizey.fr/?php#accept-a-paid-order
We can accept orders on status “Paid“ only (In Hemi - “Pending“) and orders which have Is Acknowledged = “Pending“ . After we send “accept“ to an order, into the response, we will receive again all related data for the order and we need to update the status of the order (It will be “Accepted“ and in Hemi will be “Ready for Shipping)“ and Is Acknowledged = “Completed”.
We need to make sure we will set Is Acknowledge = “Completed“
Example response:
{
"id": "a50b9957-ac24-435d-ad1c-145390ae1e46",
"date": "2022-07-28T08:35:25+00:00",
"clientFirstName": "",
"clientLastName": "",
"clientCreatedAt": "2018-11-07T14:40:58+00:00",
"clientId": "44829359-6c77-480e-b793-f85df9199308",
"orderNumber": "CLZ2207962152",
"price": 5000,
"originalPrice": 5000,
"billingAddress": {
"id": "7743b6c9-bb59-4f61-8ee0-be63eec0b01f",
"firstName": "Hubert",
"lastName": "Bonisseur de La Bath",
"company": "DGSE",
"street": "141, boulevard Mortier",
"street2": "",
"street3": "",
"postcode": "75020",
"city": "Paris",
"countryCode": "FR",
"phoneNumber": "0123456789",
"splitStreet": [
"141, boulevard Mortier"
],
"state": "Île-de-France",
"email": "client-clz2207962152dd@colizey.com"
},
"status": 2,
"dateShipped": null,
"orderLines": [
{
"id": "3a5a8d9a-0e50-11ed-8471-42010a840002",
"sku": "sku_1",
"original_quantity": 1,
"refunded_quantity": 0,
"quantity": 1,
"itemPrice": 5000,
"productDescription": "Test Order2",
"status": 2,
"merchant_product_id": 5733,
"vatRate": 0,
"vatAmount": 0,
"customMerchantId": ""
}
],
"shippingMethod": "Mondial Relay",
"shippingPrice": 0,
"shippingTrackingNumber": null,
"shippingTrackingUrl": null,
"shippingAddress": {
"firstName": "Hubert",
"lastName": "Bonisseur de La Bath",
"phoneNumber": "0123456789",
"id": "eba0c23b-a74f-40ba-85b5-bdab62d2da6f",
"company": "La Post",
"street": "rue du Louvre",
"street2": "",
"street3": "",
"postcode": "75001",
"city": "Paris",
"countryCode": "FR",
"splitStreet": [
"rue du Louvre"
],
"state": "Île-de-France",
"email": "client-clz2207962152dd@colizey.com"
},
"shippingType": "relay",
"shippingIsRelay": true,
"shippingIsAtHome": false,
"shippingRelayId": "1234",
"shippingRelayProvider": "Mondial Relay",
"shippingRelayProviderId": "e5246b74-04ee-4b6a-9bb2-362a4da9d255",
"returns": [],
"partialRefunds": [],
"updatedAt": "2022-07-28T11:18:34+00:00"
Error Cases:
- Accept already accepted order
{
"error": ""
}
Error message: The order is already accepted!
- Accept unpaid order
{
"error": ""
}
Error message: “The order is unpaid.“
Note: Bear in mind this error message is not coming from Colizey. Based on a communication with them “I'm afraid you won't be able to retrieve more information from the API for now, in both live and sandbox envs. But if you encounter any error, please let me know and I will tell you what is going on.“ Based on this, we could contact them for receivein more information regarding errors.*