Sandbox

To facilitate ease of connector development, integration and testing, Amazon Yojaka supports a sandbox against which you can test all your connector code. You can test code that validates any workflow management, error handling, and idempotency checks, apart from testing your code for that handles authentication and authorization.

Further, Amazon Yojaka supports a simple utility that will let you inject orders into the sandbox to help facilitate complete testing of your code.

How do I use it?

To use the sandbox from your connector, complete the On-boarding and Seller Registration steps. Reach out to the smartconnect-support@amazon.com to request access to our sandbox.

Sandbox Setup

Once the Amazon Yojaka team receives your on-boarding and seller registration details, the following setup will be done on the sandbox:

  1. Setup your connector to be able to access the sandbox

  2. Create an account in the Amazon Yojaka sandbox for the seller

  3. Create a pseudo-location in the Amazon Yojaka sandbox for the seller

Once the sandbox setup is done, the Amazon Yojaka team will provide you with the following information:

  • Identifier of the Amazon Yojaka sandbox’s pseudo location created for the seller. You will need this identifier as an input parameter in many of Amazon Yojaka’s API calls.

Tip

Reach out to smartconnect-support@amazon.com if you need multiple pseudo-locations created for a single seller in the Amazon Yojaka sandbox for your testing.

Sandbox Details

Once you have been on-boarded onto Amazon Yojaka’s sandbox, you can direct your connector code to use the Amazon Yojaka sandbox’s endpoint URL as the base URL for all the APIs.

Country / Area

API Endpoint URL

IN

api.sandbox.dub.yojaka.xp.sellers.a2z.com

NA

api.sandbox.iad.yojaka.xp.sellers.a2z.com

How do I inject orders?

While the Amazon Yojaka sandbox works very much like the production system, the main difference is that the sandbox is disconnected from all marketplaces. Any inventory updates, order processing, etc are only handled internally within the sandbox and no updates are sent to any marketplace.

Because of the disconnected sandbox model, orders will not be injected into the sandbox from any marketplace/channel. To facilitate complete testing of your connector, Amazon Yojaka provides an API that allows you to an order into the sandbox. You can specify the following attributes for the sandbox-order to control the testing of your connector.

  • Location id

  • One or more line items in the order

For each line item in the order, you need to specify the following values:

  • SKU of line item

  • Number of units

The API’s response will include the identifier of the newly created sandbox order.

API Description

This section documents that API provided by the Amazon Yojaka sandbox for injecting an order into the sandbox.

Note

The Authentication and Authorization mechanisms for this API are exactly the same as that of any other Amazon Yojaka API.

HTTP Method

POST

Path

/v1/sandbox/orders

Request

{
    // Use the pseudo-location's id provided as part of sandbox onboarding
    "locationId": "d8973c6b-8571-451d-8e0f-c1c447187379",
    // This optional field can have one of two values - "REPLACEMENT" or
    // "EXCHANGE". Specify this value to inject a replacement/exchange
    // order into the sandbox. Omitting this field will insert a new order
    // into the sandbox.
    // Note: Check Order response to understand difference between
    // exchange and replacement orders
    "replacementOrderType": "EXCHANGE",
    "lineItems": [{
        // Use any SKU identifier of your choice
        "sku": "TestSku1",
        // Provide any positive number greater than 1
        "numberOfUnits": 2
    }, {
        "sku": "TestSku2",
        "numberOfUnits": 1
    }]
}

Response

{
    // Identifier of the newly created sandbox order
    "orderId": "8b9e408d-48bc-459f-ad27-8e37912e6c105"
}

What about SKUs?

For the purpose of enabling your testing, the sandbox will treat any SKU you provide as a valid SKU on any marketplace. You can use any SKU identifier to update inventory, or any SKU identifier while injecting orders into the sandbox.

Working with Postman

You can use the Postman tool to invoke Amazon Yojaka’s APIs and familiarize yourself with the API methods, requests and responses. You can find more information about the Postman tool here.

For easier usage and testing of Amazon Yojaka’s APIs in the sandbox from the Postman tool, follow the instructions given below:

  1. Download the Postman collection onto your local system

  2. Launch the Postman tool

  3. Import the collection into the Postman tool using the instructions given here

You can now use the APIs imported into the Postman tool to invoke and test the Amazon Yojaka APIs in the sandbox.

Note

We recommend that you download and use the latest version of the Postman tool for testing. You can download the Postman tool here.