Introduction
API

SFTP

Testing Integration#

Click below to jump to the topics:

Prerequisites for Testing#

In order to test your integration, you’ll need to do the following:#

  1. Have a test user

    You must share with your Account Manager an email address you have access to, but that does not already exist in PedidosYa. This email will be used to create a test user so you can view your test store from the PedidosYa mobile app.

  2. Have a test store

    Your Account Manager must provide you with the ID, name, and address of your test store.

  3. Have access to the test store in Partner Portal

    Your Account Manager must ensure that you have access to the test store in Partner Portal.

  4. Validate your integration

    You can test the different functionalities you develop in your test store and see their impact in Partner Portal or in the PedidosYa app.

How do I perform E2E testing?#

It is important to go through the end-to-end testing process. To ensure a smooth integration, you need to test various scenarios by following these steps.

In order to send requests , please create a Bearer Token in Partner Portal. Please refer to the Token Management & Access Section.

As you send the request to update the product - an asynchronous job will be created in the background, meaning that the job is later sent to the configured webhook.

Creating a Promotion#

  1. Prepare the Request:

    1. Create the API request to create a promotion.

    2. Ensure the request contains valid SKUs and promotion details.

  2. Send the Request: When the request is submitted, the status of the promotion will be queued, meaning it is in the process of being created.

  3. Check Promotion Status: Use the GET endpoint to query the status of the promotion and confirm its completion.

  4. Review the Promotion: Validate the promotion in the Vendor Portal or the Platform App to ensure it was successfully created.

Best Practices:#

  1. To minimize operational impact, create promotions for one or two products with a small discount (e.g. a few cents).

  2. Ensure the discounted price is always lower than the original price; otherwise, the promotion will not be created.

  3. Check that the changes are displayed correctly in the store by accessing it through the app.

Modifying a Promotion#

  1. Prepare the Modification Request:

    1. Use the same API request as for the promotions creation.

    2. To remove a SKU, set "active": false at the SKU level.

  2. Submit the Request: Send the request and ensure the job is processed.

    1. Check the Update Status: Use the GET endpoint to confirm the job was completed.

    2. Validate in the Vendor Portal or by accessing the test store through the app: Verify that the SKU was successfully removed from the promotion.

Deactivating a Promotion#

  1. Prepare the Deactivation Request: Send the same request with "active": false at the campaign level.

  2. Submit the Request: The promotion will be deactivated upon successful processing.

  3. Confirm Deactivation: Use the GET endpoint to ensure the job was completed.

  4. Verify in the Vendor Portal: Confirm that the promotion is no longer active.

If all updates are correctly processed without errors, the integration is ready to go live. You can schedule a meeting here with our Integrations Support team to certify your integration.


APIUse Cases - Endpoints ExplainedAPITroubleshooting