Update order's digital content by order number
Update's order digital contents with OPEN-API
, Third party can only update on these scenario
- An order is in
PREPARE_TO_SHIP
state - An order is in
COMPLETED
state if it's aCASH_ON_DELIVERY
order
Remark
A number of contents has to match with amount of product code in particular order.
E.g.
Customers buy
VA-0101
for 5 pcsSystem will expect 5 digital contents from
VA-0101
After the validation, system will send a response message back to end customer with provided contents
Endpoint
/v1/orders/:orderNumber/digital-contents
Resource method
POST
Parameters
URL parameter
Field name | Types | Required/Optional | Description |
---|---|---|---|
orderNumber | string(12) | R | Order's number |
Body parameters
Field name | Types | Required/Optional | Description |
---|---|---|---|
items | list of item | R | Selected Items’ in order with digital contents |
item.productCode | string(30) | R | Selected Item code |
item.digitalContents | list of reward | R | Selected Item digital contents |
digitalContent.refId | string(255) | R | Selected Item digital content reference id (or serial id) |
digitalContent.content | string(255) | R | Selected Item digital content (image url or text) |
digitalContent.availability | object | R | Availability information (Digital content) |
availability.type | string(10) | R | Availability type |
availability.settings | object | O | Availability settings |
settings.availableAt | string(10) | O | Availabled at date format (YYYY-MM-DD) |
settings.expiredAt | string(10) | O | Expired at date format (YYYY-MM-DD) |
settings.unit | string(10) | O | Period unit (years , quarters , months , weeks , days , hours , minutes , seconds , milliseconds ) |
settings.value | number(10) | O | Availability value which will be used with with given unit |
Example request parameter
{
"items": [
{
"productCode": "VA-4017",
"digitalContents": [
{
"content": "OKKJGDQ",
"refId": "ABC-asdflk",
"availability": {
"type": "NO_EXPIRY"
}
},
{
"content": "KSDAL1dsk",
"refId": "ABC-1asd257",
"availability": {
"type": "NO_EXPIRY"
}
}
]
},
{
"productCode": "VA-4011",
"digitalContents": [
{
"content": "XLA!ao1d",
"refId": "ABC-1asdk27",
"availability": {
"type": "EXPIRY_DATE",
"settings": {
"expiredAt": "2020-02-10"
}
}
}
]
}
]
}
Example expected response object
200 - OK status code