Skip to content

Example usage

Create an application

  1. log in to BUYMA Partners.
  2. go to the Application Management screen and click the [Create New Application] button.
  3. fill in the Required Fields, select the [Sandbox] checkbox, and click the [Register] button.

Create a sandbox store

  1. go to the Sandbox Shop Management screen, and click the [Create New Sandbox Shop] button.
  2. fill in the Required Fields and click [Save] button.

Request permission from the seller's 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 code obtained in the above Request permission from seller account step, 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 Token above. 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 Token above. 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

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

  1. 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.
  2. Select the required items and click [Create New Order] button.

Confirm the order

List

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 Token above. 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