Method "getStatus"
Return status information by id.
Parameters
| id | ID of makeOrder request. |
Response
| status | Status code (pending → executing → ok OR error). |
| id | ID of makeOrder request. |
| order_id | Giftery internal order ID (in test mode always is 999999). |
| product_id | Product ID (see method getProducts). |
| face | Denomination of the e-gift card (see method getProducts). |
| balance | Shows the balance of the gift card for redeemable gift cards (may be of type int or null) |
| expire_date | Date of expiration of the e-gift card (may be type of string Y-m-d H:i:s or null) |
| code | Service order code (see method makeOrder). |
| comment | Service comment (see method makeOrder). |
| testmode | Test mode flag. |
| gift_page_url | URL of the gift page for receiving the certificate. null if not available. |
| error_code | Returned in case of status = error (see Error Codes). |
| error_text | Returned in case of status = error. |
Example
cmd = "getStatus"
data = "id=4578412"Response (order processed successfully)
JSON
{
"status": "ok",
"data": {
"status": "ok",
"id": 4578412,
"order_id": 2457845,
"product_id": 2111,
"face": 1000,
"sum": 1000,
"expire_date": "2029-12-31 23:59:59",
"code": "API",
"comment": "",
"testmode": 0,
"gift_page_url": "https://my.giftery.app/gift/new/12457845qA1iO9vV2n"
}
}Response (order processing error)
JSON
{
"status": "ok",
"data": {
"status": "error",
"id": 4261,
"order_id": 156540,
"product_id": 11642,
"face": 3000,
"sum": 3000,
"expire_date": null,
"code": "API",
"comment": "471367",
"testmode": 0,
"gift_page_url": null,
"error_code": 5000,
"error_text": "Insufficient funds."
}
}