Example usage¶
Create an application¶
- log in to BUYMA Partners.
- go to the Application Management screen and click the [Create New Application] button.
- fill in the Required Fields, select the [Sandbox] checkbox, and click the [Register] button.
Create a sandbox store¶
- go to the Sandbox Shop Management screen, and click the [Create New Sandbox Shop] button.
- fill in the Required Fields and click [Save] button.
Request permission from the seller's account¶
- Make a GET request to the following URL Reference: Request permission from seller account
https://sandbox.personal-shopper-api.buyma.com/oauth/authorize
response_type=code
&client_id={Client ID}
&redirect_uri={application callback URL}
&state={a unique, random value for each request}
Execution example:
https://sandbox.personal-shopper-api.buyma.com/oauth/authorize
response_type=code
&client_id=********
&redirect_uri=https://example.org/callback
&state=00000000
Users who go to this URL will be asked to log in on the BUYMA Partners Sandbox.
After logging into the BUYMA Partners Sandbox, you will be redirected to
this URL again.
The user will be redirected to redirect_uri after the installation is executed
in the application installation dialog.
Make sure that the value of state is correct at this time.
https://example.org/callback?code=********&state=00000000
Get an access token¶
- Using the
codeobtained in the aboveRequest permission from seller accountstep, execute a POST request to the following URL to get the access token. Reference: Obtain an access token
https://sandbox.personal-shopper-api.buyma.com/oauth/token
Execution example:
curl -F grant_type=authorization_code \
-F client_id=******** \
-F client_secret=********
-F code=******** \f
-F redirect_uri=https://example.org/callback \
-X POST https://sandbox.personal-shopper-api.buyma.com/oauth/token
Product management¶
Register a product with the API¶
- Set the request header to the access token obtained in
Getting the Access Tokenabove. Details: Request to the REST API
X-Buyma-Personal-Shopper-Api-Access-Token: {access token}
- Make a POST request to the following URL. Details: API request
https://sandbox.personal-shopper-api.buyma.com/api/v1/products.json
Product management¶
Register a product with the API¶
- Set the request header to the access token obtained in
Getting the Access Tokenabove. Details: Request to the REST API
X-Buyma-Personal-Shopper-Api-Access-Token: {access token}
- Make a POST request to the following URL. Details: API request
https://sandbox.personal-shopper-api.buyma.com/api/v1/products.json
Check the products you have listed¶
List¶
- You can view the list of products on the Manage Products>List of Products screen.
Details¶
- Manage Products>Details(https://personal-shopper-sandbox.buyma.com/products/:product_id) You can check the product details on the screen.
Order Management¶
Try to place an order¶
- go to the Manage Products > Product List
screen, and click the [Create Order] button. /
Go to the Manage Products>Product Details(https://personal-shopper-sandbox.buyma.com/products/:product_id) screen, and click the [Create Order] button. - Select the required items and click [Create New Order] button.
Confirm the order¶
List¶
- You can view the list of orders on the Order Management>Order List screen.
Details¶
- You can view the order details on the Order Management>Order Details(https://personal-shopper-sandbox.buyma.com/orders/:order_id) screen. In addition, you can change the status in the Order Details screen.
Shipping process¶
UI¶
- On the Order Management > Order Details (https://personal-shopper-sandbox.buyma.com/orders/:order_id) screen, click the [Shipping] button.
API¶
- Set the request header with the access token obtained in
Get Access Tokenabove. Details: Request to REST API
X-Buyma-Personal-Shopper-Api-Access-Token: {access token}
- Make a POST request to the following URL. Details: API request
https://sandbox.personal-shopper-api.buyma.com/api/v1/orders/:order_id/shipment_request.json