API Documentation for SPY Systems (1.2.38)

Download OpenAPI specification:Download

E-mail: info@spysystem.dk License: Apache 2.9

API Documentation for communicating with the SPY System.

Introduction

This document will describe how developers can authenticate and communicate with the SPY System API.

OpenAPI Specification (OAS)

We're using Swagger to generate and publish an OpenAPI Specification (OAS) document for the [SPY System API] which is compatible with tools like Swagger, Open API Generator, Postman that are used for viewing and testing resources before putting them in your codebase. Also for generating client libraries in php, ruby, python, go, csharp and a lot more.

Order Flow (IMPORTANT)

Once the order is created it will be imported into the SPY System. Here it will be waiting to be packed. Once packed a webhook event will tell the api user the order has been packed and needs to be accepted before being send.

At this point the status for the delivery is pending.

By changing the delivery status to accepted, will notice the spy system that it is ok for being delivered and invoiced.

By changing the status to rejected will cancel the delivery and make it immutable. A new delivery is required for it to being delivered (NOT a new order).

It is possible to change status from accepted to pending and vice versa, but rejected is locking it.

CHANGELOG

  • 1.2.54
    • Added warehouseCode to Freight
  • 1.2.50
    • Added priceOriginal to Variant
  • 1.2.38
    • Added seasonName to Variant
  • 1.2.37
    • Added wspPrice to Variant
  • 1.2.6
    • Added Variants endpoint
    • Added Delivery endpoint
    • Added Orders endpoint
  • 1.2.7
    • Added Freight endpoint
    • Added Brands endpoint
  • 1.2.8
    • Added more information to Variants
      • Style Description
      • Wash
      • Category
      • Quality
      • Type
      • Gender
  • 1.2.14
    • Added variantType to Variant
  • 1.2.17
    • Added endpoint for getting a single delivery
    • Added more information to Variants
      • B2B Hidden
      • Color Active
      • Tags
      • Customs Tariff Number
      • Country of Origin
      • Weight

Authentication

ApiKeyAuth

Security Scheme Type API Key
Header parameter name: X-Spy-Authorization

ApiReadToken

Security Scheme Type API Key
Header parameter name: X-Spy-ReadToken

brands

Authenticate

Authenticate with Spy

Request Body schema: application/json
clientID
required
string
clientSecret
required
string

Responses

Request samples

Content type
application/json
{
  • "clientID": "string",
  • "clientSecret": "string"
}

listBrands

List Brands

Authorizations:

Responses

Response samples

Content type
{
  • "status": 0,
  • "message": "string",
  • "data":
    {
    }
}

freight

Authenticate

Authenticate with Spy

Request Body schema: application/json
clientID
required
string
clientSecret
required
string

Responses

Request samples

Content type
application/json
{
  • "clientID": "string",
  • "clientSecret": "string"
}

listFreight

List Freight Options

Authorizations:

Responses

Response samples

Content type
{
  • "status": 0,
  • "message": "string",
  • "data":
    {
    }
}

orders

Authenticate

Authenticate with Spy

Request Body schema: application/json
clientID
required
string
clientSecret
required
string

Responses

Request samples

Content type
application/json
{
  • "clientID": "string",
  • "clientSecret": "string"
}

createOrder

Create Order

Authorizations:
Request Body schema: application/json
required
object (ShippingAddress)
required
Array of objects (OrderLineItem)
reference
required
string
comment
string
required
object (Freight)

Responses

Request samples

Content type
application/json
{
  • "shippingAddress":
    {
    },
  • "orderLineItems":
    [
    ],
  • "reference": "string",
  • "comment": "string",
  • "freight":
    {
    }
}

Response samples

Content type
{
  • "status": 0,
  • "message": "string",
  • "data":
    {
    }
}

variants

Authenticate

Authenticate with Spy

Request Body schema: application/json
clientID
required
string
clientSecret
required
string

Responses

Request samples

Content type
application/json
{
  • "clientID": "string",
  • "clientSecret": "string"
}

listVariants

List Variants

Authorizations:
query Parameters
brandName
required
string
styleNo
string

Responses

Response samples

Content type
{
  • "status": 0,
  • "message": "string",
  • "data":
    {
    }
}

getVariant

List Variant based on Barcode

Authorizations:
path Parameters
barcode
required
string
query Parameters
brandName
required
string

Responses

Response samples

Content type
{
  • "status": 0,
  • "message": "string",
  • "data":
    {
    }
}

delivery

listDeliveries

List Deliveries

Authorizations:
query Parameters
from
string

From Date

to
string

To Date

Responses

Response samples

Content type
{
  • "status": 0,
  • "message": "string",
  • "data":
    {
    }
}

deliveryStatus

Delivery Status

Authorizations:
path Parameters
deliveryNo
required
string
Request Body schema: application/json
status
required
string
Enum: "pending" "accepted" "rejected"

Responses

Request samples

Content type
application/json
{
  • "status": "pending"
}

Response samples

Content type
{
  • "status": 0,
  • "message": "string",
  • "data":
    {
    }
}

deliveryDetails

Delivery Details

Authorizations:
path Parameters
deliveryNo
required
string

Responses

Response samples

Content type
{
  • "status": 0,
  • "message": "string",
  • "data":
    {
    }
}