REST API¶
The Personal Shopper API is a REST API-style API to help sellers manage their products and transactions.
The production environment API endpoint is as follows.
https://personal-shopper-api.buyma.com/
The sandbox environment API endpoint is as follows.
https://sandbox.personal-shopper-api.buyma.com/
API requests are asynchronous updates¶
- Requests received by the API are processed asynchronously. The results of the API will include the processing ID.
- The results of API processing will be notified via the Webhook URL registered in the application.
- If there is an error in the content of the API, it will also be notified via the Webhook URL
- There will be a certain amount of delay from the time the API is completed to the time it is reflected and notified on BUYMA.com.
Execution Example¶
Example of response when executing the API for registering products¶
POST /api/v1/products.json
HTTP/1.1 201 Created
{
"request_received_at": "2019-09-05T12:10:40.114775+09:00",
"request_uid": "2001909051121040114775746896"
}
|
Item |
Description |
|---|---|
|
request_received_at |
Request received date and time (ISO8601) |
|
request_uid |
request identifier |
Pagination¶
The API for retrieving a list supports pagination. By specifying the query parameters, you can manipulate the retrieval of any page and the number of items that can be retrieved in one page.
For each API request, the result of one page will be included in the response body and returned. For each API request, the result of one page will be included in the response body, and the link to the related page (if data exists), the number of items in one page, the total number of items, and the current page number will be included in the response header and returned.
Execution Example¶
Sample response when executing the Transaction List API¶
GET /api/v1/orders.json?page=2&per_page=1
| Parameter name | Description | Supplementary |
|---|---|---|
| page | Page to retrieve | default: 1 |
| per_page | Number of items that can be retrieved per page. | default: 50, maximum: 100 |
HTTP/1.1 200 OK
...
Link: <https://personal-shopper-api.buyma.com/api/v1/orders.json?page=1&per_page=1>; rel="first", <https://personal- shopper-api.buyma.com/api/v1/orders.json?page=1&per_page=1>; rel="prev", <https://personal-shopper-api.buyma.com/api/v1/orders.json?page=3&per_page=1>; rel="last", <https://personal-shopper-api.buyma.com/api/v1/orders.json? page=3&per_page=1>; rel="next"
X-Items-Per-Page: 1
X-Total-Items: 3
X-Current-Page: 2
...
| Header name | Description |
|---|---|
| Link |
Links to related pages.
rel parameter
|
| X-Items-Per-Page | Number of items per page. |
| X-Total-Items | Total number of items |
| X-Current-Page | Current page count |