Skip to content

Test your integration

Open .md

You create an API key in Profile: on the API Access card, select Create API Key. Opening the page never creates one. Creating a key needs:

  • A plan that includes API access, Pro or higher (the Quickstart lists them).
  • An active, paid subscription.

On a trial, you can’t create a key in Profile. The card says “API keys need an active subscription. If you’re on a trial and want to try the API, email support@yoprint.com.” The API itself works on a Pro trial: if you already have a key, it works on the trial team too.

Once you have a key, the card’s Make your first request section has a request that checks the key and your Team ID together. See the Quickstart.

The safest place to test is a team you don’t use for real work. To test on a separate team, email support@yoprint.com. Support will tell you whether one can be set up for you, and what it costs.

What you need on your side:

  • You create the key on a team with a paid plan that includes API access, usually your live team.
  • You’re a member of the test team. Your key works on every team you’re a member of whose plan includes API access (Pro or higher), so you don’t need another key: change the team slug in the path to switch between the test team and your live team. See Teams and the team slug.

Start with reads. They change nothing. Then, for writes:

  • Name test records clearly, for example a customer called “TEST Northwind Apparel”, so your team can tell them apart.
  • Use a test customer whose only contact is you. Emails and texts go to the record’s contacts. Never send a message or an approval to a real customer while testing.
  • Don’t buy labels. Getting rates is free. To test the rest of the shipping flow, record a label bought elsewhere instead. You can’t connect a Shippo test key to YoPrint: GoShippo is connected by signing in to Shippo in the web app, and every label bought through it is real. See Ship an order.
  • Don’t charge cards. Record test payments only on test orders, and delete them afterwards.
  • Watch the email limits. Test emails count toward your team’s daily limit, and going over it blocks the whole team’s email. See Limits.
  • Tell your team. Webhooks, Zapier and other integrations on the team react to your test records too.

See the shape of an event, built from your team’s latest matching record:

GET Show a sample event /v1/api/store/{team_slug}/setting/webhook_subscription/sample/{event_name}

To receive a real delivery, subscribe a test URL (a public https:// address), publish a test order, then delete it. That sends order.created and then order.deleted. See Receive events with webhooks.

Clean up in this order. Deleting a published order moves its payments to the customer’s credit, so delete test payments first.

  1. Payments. Delete each test payment you recorded on the order. Card payments can’t be deleted. Refund them instead.

    DELETE Delete a payment or refund /v2/api/store/{team_slug}/v2/sales_order/{hash_id}/payment/{payment_reference}
  2. The sales order or quote. Deleting it moves it to the trash, where it can be restored. It also deletes its invoices, jobs and shipments, releases its stock, and asks Shippo to refund labels bought for it.

    DELETE Delete a sales order or quote /v2/api/store/{team_slug}/v2/sales_order/{order_unique_key}
  3. The customer, once it has no open quote or sales order. It goes to the trash too.

    DELETE Delete a customer /v1/api/store/{team_slug}/customer/{hash_id}
  4. Products and webhooks. Phase out test products, or delete them after the delete check, and delete test webhook subscriptions.