Skip to main content

API Introduction

Overview

The ZigZag APIs are designed for developers who want to create innovative solutions and integrations with the ZigZag platform. ZigZag APIs are built on the REST architecture, body and response content are provided in JSON format.

The Returns API enables real time returns management.

The Webhooks API enables real-time data transfer by pushing event-driven notifications to subscribed endpoints.

Response Codes

ZigZag uses conventional HTTP response codes to indicate the success or failure of an API request. In the list bellow you can see the meaning of the code ranges

  • 2xx range – Success
  • 4xx range – Error (error code and response will provide more information)
  • 5xx range – Error with ZigZag's servers (rare)

Error responses include detailed messages to help diagnose and resolve issues.

Authentication

When you sign up for an account, you will be provided an API username and password.

  1. First you will need to obtain a JWT token using the POST /token API
  2. The resulting token will need to be used in all subsequent API requests within the Authorization header. Example: Authorization: Bearer qwe123.rty

Token validity expires every 30 minutes, so when a 401 (Unauthorized) response is received, a new token needs to be generated.

Retry Policy

If a webhook event receives any of the following responses from the retailer API, ZigZag will retry delivery:

  • Forbidden
  • Unauthorized
  • BadGateway
  • BadRequest
  • InternalServerError
  • MethodNotAllowed
  • RequestTimeout
  • No response

Failed attempts to send the data will result in a daily retry for the past 7 days worth of failed attempts. These failed attempts will continue to be retried until a successful response is received from the third party system.