Skip to content

Instantly share code, notes, and snippets.

@flaviozantut
Last active February 28, 2020 15:29
Show Gist options
  • Save flaviozantut/66c2ebc0fe90d9360ae8fc5d3529ca86 to your computer and use it in GitHub Desktop.
Save flaviozantut/66c2ebc0fe90d9360ae8fc5d3529ca86 to your computer and use it in GitHub Desktop.
{
"id": "1341245",
"clientId": "tokstok",
"channelId": "site",
"fulfillments": {},
"payments": {},
"status": "PENDING",
"services": {
"01": {
"id": "01", // *
"type": "COLLECT", // *
"status": "COMPLETED", // *
"orderId": "1341245", // automatico $.id
"provider": {
"id": "123",
"name": "xx c"
},
"address": {
"address1": "av Algum Lugar",
"address2": "ap 100",
"city": "São Paulo",
"country": "BR",
"description": "Apartamento",
"firstName": "Fulano",
"lastName": "Alguem",
"neighbourhood": "Algum Lugar",
"number": "500",
"state": "São Paulo",
"telephone": {
"number": "1199999999",
"type": "billing"
},
"zip": "00000-000",
},
"orderReferences": [
{
"orderId": "13123", // obrigatorio quando presente
"channelId": "site", // obrigatorio quando presente
"fulfillments": [
"F1"
], // obrigatorio quando items estiver presente
"items": [
"sku1",
"sku2"
]
}
],
"serviceReferences": [
{
"orderId": "13123", // obrigatorio quando presente
"channelId": "site", // obrigatorio quando presente
"services": [
"01"
], // obrigatorio quando items estiver presente
}
],
"description": "servico x",
"discount": 0,
"amount": 19, //
"totals": {
"originalAmount": 19, // $amount
"totalAmount": 19, // $.amount - $.discount - $history.CANCELED.refund
"serviceAmount": 19, // $.amount - $.discount
"totalRefund": 19
},
"createdAt": "2020-01-14T04:55:55.767Z",
"updatedAt": "2020-01-14T04:55:55.767Z",
"history": [
{
"id": "3ertfd56",
"status": "CREATED",
"updatedAt": "2020-01-14T04:55:55.767Z",
"createdAt": "2020-01-14T04:55:55.767Z"
},
{
"id": "3ertfd567",
"status": "SCHEDULED",
"scheduleDate": "2020-02-01T04:55:55.767Z",
"updatedAt": "2020-02-01T04:55:55.767Z",
"createdAt": "2020-01-14T04:55:55.767Z"
},
{
"id": "3ertfd5456",
"status": "SCHEDULED",
"scheduleDate": "2020-02-10T04:55:55.767Z",
"updatedAt": "2020-01-14T04:55:55.767Z",
"createdAt": "2020-01-14T04:55:55.767Z"
},
{
"id": "3ertfd5456g",
"status": "BEING_COLLECTED",
"carrier": {},
"date": "2020-02-10T04:55:55.767Z",
"updatedAt": "2020-01-14T04:55:55.767Z",
"createdAt": "2020-01-14T04:55:55.767Z"
},
{
"id": "3ertfd54509",
"status": "COLLECTED",
"carrier": {},
"collectedItems": [
{
"sku": "sku1",
"quantity": 1
}
],
"date": "2020-02-10T04:55:55.767Z",
"updatedAt": "2020-01-14T04:55:55.767Z",
"createdAt": "2020-01-14T04:55:55.767Z"
},
{
"id": "3ertfd54509",
"status": "CANCELED",
"clientId": "xxxx",
"channelId": " ",
"orderId": "dsfsdf",
"serviceId": "",
"commnet": "commnet about exception",
"reason": "",
"placedAt": "2020-02-28",
"type": "CANCELATION",
"refund": {
"refundValue": 10, // <= $.amount
"refundType": "XXXXX"
},
"updatedAt": "2020-01-14T04:55:55.767Z",
"createdAt": "2020-01-14T04:55:55.767Z"
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment