-
Notifications
You must be signed in to change notification settings - Fork 1
Shop administrator v1
Muzicius edited this page Dec 6, 2016
·
3 revisions
| Method | Address |
|---|---|
| GET | /api/v1/points/admin/:admin_token/accounts/:account_id/orders |
| Url parameter | Type | Required | Description |
|---|---|---|---|
| admin_token | String | true | Authorization token of the admin |
| account_id | Integer | true | Id of an account |
| skip | Integer | false | Number to skip |
| limit | Integer | false | Number to limit |
Response:
{
"status": "ok",
"result": [
{
"id": 2,
"author": {
"id": "user id",
"username: "uis username"
},
"status": "in_process",
"creation_date": 1476887949,
"is_joint_purchase": false,
"total_price": 900,
"items": [
{
"id": 1,
"title": "Polo shirt",
"amount": 1,
"category": {
"id": 1,
"title": "Clothes"
},
"price": 900,
"properties": {
"Size": "S",
"Colour": "Black"
}
}
]
}
]
}
| Method | Address |
|---|---|
| GET | /api/v1/points/admin/:admin_token/orders/:status |
| Url parameter | Type | Required | Description |
|---|---|---|---|
| admin_token | String | true | Token of an administrator |
| status | String | true | Can be 'in_process', 'rejected', 'approved', 'waiting_to_process' |
Response:
{
"status": "ok",
"result": [
{
"id": 1,
"author": {
"id": "some id",
"username": "uis username"
},
"status": "in_process",
"creation_date": 1476886245,
"is_joint_purchase": false,
"total_price": 900,
"items": [
{
"id": 1,
"title": "Polo shirt",
"amount": 1,
"category": {
"id": 1,
"title": "Clothes"
},
"price": 900,
"properties": {
"Size": "S",
"Colour": "Black"
}
}
]
}
]
}
| Method | Address |
|---|---|
| GET | /api/v1/points/admin/:admin_token/orders/:order_id |
| Url parameter | Type | Required | Description |
|---|---|---|---|
| admin_token | String | true | Token of an administrator |
| order_id | Integer | true | Id of an order |
Response:
{
"status": "ok",
"result": {
"id": 1,
"status": "in_process",
"creation_date": 1476886245,
"is_joint_purchase": false,
"total_price": 900,
"items": [
{
"id": 1,
"title": "Polo shirt",
"amount": 1,
"category": {
"id": 1,
"title": "Clothes"
},
"price": 900,
"properties": {
"Size": "S",
"Colour": "Black"
}
}
],
"author": {
"id": "some id",
"username": "uis username"
}
}
}
Possible only for orders with status 'in_process'
| Method | Address |
|---|---|
| PUT | /api/v1/points/admin/:admin_token/orders/:order_id/:action |
| Url parameter | Type | Required | Description |
|---|---|---|---|
| admin_token | String | true | Token of an administrator |
| order_id | Integer | true | Id of an order |
| action | String | true | Can be 'approve' or 'reject' |
Response:
{
"status": "ok",
"result": {
id: 1
}
}