Loyalty bonuses
Creating a task to notify about accrued bonuses for an order.
Request
POST
/partner-integration/v1/loyalty/bonus-points
Headers
|
Name |
Description |
|
Authorization* |
Type: string Token generated by Yango Deli. |
|
Partner-Name* |
Type: string Partner’s name. |
Body
application/json
{
"order_id": "string",
"points_request_type": {
"type": "points_charge",
"card_number": "string",
"points_value": 0
}
}
|
Name |
Description |
|
order_id* |
Type: string Order ID in the Partner’s system. Min length: |
|
points_request_type* |
Type: PointsCharge Type of incoming request, either bonus accrual or error. |
PointsCharge
Accrual of bonus points.
|
Name |
Description |
|
points_value* |
Type: integer Number of bonus points accrued for the order. Min value: |
|
type* |
Type: string Object schema discriminator; for Example: Enum: |
|
card_number |
Type: string User’s card number. |
PointsError
Bonus accrual failed.
|
Name |
Description |
|
reason* |
Type: string Reason for the accrual error (the customer is not a loyalty program member or the accrual failed). Enum: |
|
type* |
Type: string Object schema discriminator; for Example: Enum: |
|
message |
Type: string Additional error information. |
Responses
201 Created
The task to notify about accrued bonuses for the order was accepted successfully.
400 Bad Request
Malformed request.
Body
application/json
{
"message": "string",
"code": 0,
"details": {}
}
|
Name |
Description |
|
code* |
Type: integer Error code. |
|
message* |
Type: string Error message. |
|
details |
Type: object |
403 Forbidden
No access to create a task for the specified order.
Body
application/json
{
"message": "string",
"code": 0,
"details": {}
}
|
Name |
Description |
|
code* |
Type: integer Error code. |
|
message* |
Type: string Error message. |
|
details |
Type: object |
409 Conflict
A task has already been assigned for the specified order within the last 24 hours.
Body
application/json
{
"message": "string",
"code": 0,
"details": {}
}
|
Name |
Description |
|
code* |
Type: integer Error code. |
|
message* |
Type: string Error message. |
|
details |
Type: object |
500 Internal Server Error
Internal service error, please retry the request.
Body
application/json
{
"message": "string",
"code": 0,
"details": {}
}
|
Name |
Description |
|
code* |
Type: integer Error code. |
|
message* |
Type: string Error message. |
|
details |
Type: object |
No longer supported, please use an alternative and newer version.