Order API

Order-related API features

Order requests

Filtering termsDescription

limit

Hits within a page (default: 100, maximum: 1000)

page

Number of the requested page (default: 0)

wspyId

Internal ID, API returns it when an order is created

referenceId

External ID, the ID given when an order is created

referenceName

Order's name, the name given when an order is created

paymentStatus

Payment status (e.g.: paid, pending, etc.)

paymentGateway

Method of payment (e.g.: cod, card, etc.)

lastMod

Last modification's date. Lists even several created or modified orders after the given date.

Filtering terms listed above are linked with AND , you need to add only the terms that you'd like to filter.

In case of XML:

Url: https://app.webshippy.com/wspyapi/GetOrder/xml

Request:

<?xml version="1.0" encoding="utf-8"?>
<request>
  <apiKey>api-key-comes-here</apiKey>
  <page>0</page>
  <limit>10</limit>
  <filters>
    <wspyId></wspyId>
    <referenceId></referenceId>
    <referenceName></referenceName>
    <paymentStatus></paymentStatus>
    <paymentGateway></paymentGateway>
    <lastMod>2018-01-01 00:00:00</lastMod>
  </filters>
</request>

Response (example):

<?xml version="1.0" encoding="utf-8"?>
<response>
  <status>success</status>
  <message/>
  <result>
    <elem>
      <wspyId>176</wspyId>
      <status>fulfilled</status>
      <referenceId>87962-110037</referenceId>
      <referenceName>87962-110037</referenceName>
      <createdAt>2018-02-14 13:04:33</createdAt>
      <fulfilledAt>2018-02-20 16:27:17</fulfilledAt>
      <paymentGateway>cod</paymentGateway>
      <paymentStatus>pending</paymentStatus>
      <paymentTotalPrice>8940.00</paymentTotalPrice>
      <paymentTotalDiscounts>1000.00</paymentTotalDiscounts>
      <paymentCurrency>HUF</paymentCurrency>
      <shippingMode>GLS</shippingMode>
      <shippingPrice>1290.00</shippingPrice>
      <shippingVat>0.27</shippingVat>
      <paidAt/>
      <codAmount>1500.00</codAmount>
      <codCurrency>HUF</codCurrency>
      <codStatus/>
      <codReceivedAt/>
      <trackingCode>WSHPY176</trackingCode>
      <invoiceStatus/>
      <invoiceCreatedAt>2018-02-16 00:00:00</invoiceCreatedAt>
      <invoiceNo>inv#00001</invoiceNo>
      <refusedInvoiceNo/>
      <invoiceUrl/>
      <refusedDate/>
      <updatedAt>2018-02-26 12:18:17</updatedAt>
      <products>
        <elem>
          <sku>szuperhos-polo-piros-xl</sku>
          <productName>Szuperhős Póló</productName>
          <variantName>Piros, XL</variantName>
          <priceGross>1890.00</priceGross>
          <vat>0.27</vat>
          <quantity>3</quantity>
        </elem>
        <elem>
          <sku>cicanaci-one-size</sku>
          <productName>CicaNaci - One Size</productName>
          <variantName/>
          <priceGross>990.00</priceGross>
          <vat>0.27</vat>
          <quantity>1</quantity>
        </elem>
        <elem>
          <sku>akcios-sapka</sku>
          <productName>Akciós sapka</productName>
          <variantName>Fekete</variantName>
          <priceGross>1990.00</priceGross>
          <vat>0.27</vat>
          <quantity>1</quantity>
        </elem>
      </products>
    </elem>
    <elem>
      [ ... ]
    </elem>
    [ ... ]
  </result>
</response>

In case of a failed request (example):

<?xml version="1.0" encoding="utf-8"?>
<response>
  <status>error</status>
  <message>
    <elem>[field: lastMod]The field must be a valid datetime (eg. yyyy-mm-dd hh:ii:ss)</elem>
  </message>
</response>

In case of JSON:

Url: https://app.webshippy.com/wspyapi/GetOrder/json

Request:

{
  "apiKey": "api-key-comes-here",
  "page": "0",
  "limit": "10",
  "filters": {
    "wspyId": "",
    "referenceId": "",
    "referenceName": "",
    "paymentStatus": "",
    "paymentGateway": "",
    "lastMod": "2018-01-01 00:00:00"
  }
}

Response (example):

{
  "status": "success",
  "message": [],
  "result": [
    {
      "wspyId": "176",
      "status": "fulfilled",
      "referenceId": "87962-110037",
      "referenceName": "87962-110037",
      "createdAt": "2018-02-14 13:04:33",
      "fulfilledAt": "2018-02-20 16:27:17",
      "paymentGateway": "cod",
      "paymentStatus": "pending",
      "paymentTotalPrice": "8940.00",
      "paymentTotalDiscounts": "1000.00",
      "paymentCurrency": "HUF",
      "shippingMode": "GLS",
      "shippingPrice": "1290.00",
      "shippingVat": "0.27",
      "paidAt": null,
      "codAmount": "1500.00",
      "codCurrency": "HUF",
      "codStatus": "",
      "codReceivedAt": null,
      "trackingCode": "WSHPY176",
      "invoiceStatus": "",
      "invoiceCreatedAt": "2018-02-16 00:00:00",
      "invoiceNo": "inv#00001",
      "refusedInvoiceNo": null,
      "invoiceUrl": null,
      "refusedDate": null,
      "updatedAt": "2018-02-26 12:18:17",
      "products": [
        {
          "sku": "szuperhos-polo-piros-xl",
          "productName": "Szuperhős Póló",
          "variantName": "Piros, XL",
          "priceGross": "1890.00",
          "vat": "0.27",
          "quantity": "3"
        },
        {
          "sku": "cicanaci-one-size",
          "productName": "CicaNaci - One Size",
          "variantName": null,
          "priceGross": "990.00",
          "vat": "0.27",
          "quantity": "1"
        },
        {
          "sku": "akcios-sapka",
          "productName": "Akciós sapka",
          "variantName": "Fekete",
          "priceGross": "1990.00",
          "vat": "0.27",
          "quantity": "1"
        }
      ]
    },
    {
      [ ... ]
    }
  ]
}

In case of a failed request (example):

{
  "status": "error",
  "message": [
    "[field: lastMod]The field must be a valid datetime (eg. yyyy-mm-dd hh:ii:ss)"
  ]
}

Field

Description

status

Action's result. Possible values: success, error

message

Error messages are in this field in case of a failed request

result

Results of a successful request are in this field as a block in each case

wspyId

The Internal ID, API returns it when an order is created

status

Order's status, possible values: new: New draft: Draft ready: Ready packing: Packing fulfilled: Packed refused: Refused

referenceId

External ID, the ID given when an order is created

referenceName

Order's name, the name given when an order is created

createdAt

(Original) time when the order got created

fulfilledAt

Time when the order got packed

paymentStatus

Payment status

paidAt

In case it is paid, the time of payment

codAmount

Amount of Cash On Delivery

codCurrency

Currency of Cash On Delivery

codStatus

Status of Cash On Delivery

codReceivedAt

When the Cash On Delivery got recieved

trackingCode

Tracking code of the courier service

invoiceUrl

Invoice link to download (https://example.com/invoice.pdf)

invoiceStatus

Invoice status uninvoiced: Not yet invoiced invoiced: Invoiced storno: Canceled

invoiceCreatedAt

Time when the invoice got created

invoiceNo

ID number of invoice

refusedInvoiceNo

Canceled invoice's ID number

refusedDate

Time of package return, and date of canceled invoice

updatedAt

Date of last modification in our system

products

Products in an order, only in block form

sku

Product's SKU, item number

productName

Product's name

variantName

Product variant name

priceGross

Product's gross selling price

vat

VAT key

quantity

Ordered quantity

serial

Unique identifier affixed to the product at the time of packaging (optional)

Generating and modifying orders

With this function you can create and modify your orders. In case the order does not have a referenceId, the API will generate one. In case you do have, and the status of the existing order is new, or draft, or there has not been manual modification, then the API modifies it. In case of a successful generation or modification, API gives back the order's Internal ID.

Field

Required?

Description

apiKey

Yes

API key

order

Yes

Order's details in generation or modification

referenceId

Yes

External ID, free word, recommended to use the order's ID

referenceName

No

Order name, free word, recommended to use the order's ID or a name created with it, for example ORDER#1221

createdAt

Yes

Time of order's creation

shipping

Yes

Delivery data

shipping.name

Yes

Recipient's name

shipping.company

No

Company name

shipping.email

No

E-mail address

shipping.phone

No

Phone number

shipping.countryCode

Yes

Two-digit country code (e.g.: HU)

shipping.stateOrProvinceCode

No

State, Province ( especially when addressed abroad)

shipping.zip

Yes

Post code

shipping.city

Yes

City

shipping.address1

Yes

First line of address

shipping.address2

No

Second line of address

shipping.note

No

Title's note, use of <![CDATA[]]> recommended

shipping.mode

No

Transfer method, possible values:

  • GLS-HU,

  • DPD-HU,

  • FOXPOST-HU,

  • DHL,

  • SPRINTER,

  • CSOMAGKULDO-HU

  • MPL.

shipping.packPoint

No

Type of Pack point, possible values:

  • GLS-HU,

  • DPD-HU,

  • FOXPOST-HU,

  • SPRINTER,

  • CSOMAGKULDO-HU

  • MPL,

  • EUSHIPMENTS-328-ROMANIA-SAMEDAY,

  • EUSHIPMENTS-643-POLAND-INPOST-LOCKERS,

  • EUSHIPMENTS-722-CROATIA-GLS-LOCKERS,

  • EUSHIPMENTS-15-BULGARIA-ECONT.

shipping.packPointId

No

Pack point's ID

billing

No*

Billing data, requested when we invoice

billing.name

Yes

Invoice name

billing.company

No

Company name

billing.taxNumber

No

Tax number

billing.phone

No

Phone number

billing.countryCode

Yes

Two-digit country code (e.g.: HU)

billing.zip

Yes

Post code

billing.city

Yes

City

billing.address1

Yes

First line of address

billing.address2

No

Second line of address

payment

Yes

Information about payment

payment.paymentMode

Yes

Payment method, uses smart surveying, recommended values: cod, card, paypal, etc.

payment.codAmount

No

Amount of Cash On Delivery, may differ from total, courier recieves it as COD amount

payment.paymentStatus

Yes

Payment status, possible values: paid, pending. Other cases require consultation

payment.paidDate

No*

Date of payment, reuired if the status is paid

payment.shippingPrice

No

Price of delivery fee (Gross)

payment.shippingVat

No

Price of delivery fee's VAT key

payment.currency

Yes

Currency of order, three-digit (ISO) ID e.g.: HUF

payment.discount

No

Discount from Total

products

No

Products in the Order

products.sku

Yes

Product's SKU, item number

products.productName

Yes

Product's name

products.variantName

No

Product variant name

products.priceGross

Yes

Product's gross selling price

products.vat

Yes

VAT key

products.quantity

Yes

Ordered quantity

invoiceUrl

No

Invoice link to download (https://example.com/invoice.pdf)

Required when API connection has Manual PDF invoice system (in this case the system uses it)

pdfSource

No

PDF format invoice file with base64 coding

Required when API connection has Manual PDF invoice system

In case of XML:

Url: https://app.webshippy.com/wspyapi/CreateOrder/xml

Request:

<?xml version="1.0" encoding="utf-8"?>
<request>
  <apiKey>api-key-comes-here</apiKey>
  <order>
    <referenceId>87962-110037</referenceId>
    <referenceName>87962-110037</referenceName>
    <createdAt>2018-02-14 13:04:33</createdAt>
    <shipping>
      <name>Kováts Béla</name>
      <company>Virág Bt.</company>
      <email>bela@viragbt.hu</email>
      <phone>+36301234567</phone>
      <countryCode>HU</countryCode>
      <stateOrProvinceCode></stateOrProvinceCode>
      <zip>1234</zip>
      <city>Budapest</city>
      <address1>Virág utca 25.</address1>
      <address2></address2>
      <note><![CDATA[Szállításkor kérem a futárt, hogy ne csengessen!!!]]></note>
      <mode>GLS</mode>
    </shipping>
    <billing>
      <name>Kováts Béla</name>
      <company>Virág Bt.</company>
      <phone>+36301234567</phone>
      <countryCode>HU</countryCode>
      <zip>1234</zip>
      <city>Budapest</city>
      <address1>Virág utca 25.</address1>
      <address2></address2>
    </billing>
    <payment>
      <paymentMode>COD</paymentMode>
      <codAmount>1500.00</codAmount>
      <paymentStatus>pending</paymentStatus>
      <paidDate></paidDate>
      <shippingPrice>1290.00</shippingPrice>
      <shippingVat>0.27</shippingVat>
      <currency>HUF</currency>
      <discount>1000.00</discount>
    </payment>
    <products>
      <elem>
        <sku>szuperhos-polo-piros-xl</sku>
        <productName>Szuperhős Póló</productName>
        <variantName>Piros, XL</variantName>
        <priceGross>1890.00</priceGross>
        <vat>0.27</vat>
        <quantity>3</quantity>
      </elem>
      <elem>
        <sku>cicanaci-one-size</sku>
        <productName>CicaNaci - One Size</productName>
        <priceGross>990.00</priceGross>
        <vat>0.27</vat>
        <quantity>1</quantity>
      </elem>
      <elem>
        <sku>akcios-sapka</sku>
        <productName>Akciós sapka</productName>
        <variantName>Fekete</variantName>
        <priceGross>1990.00</priceGross>
        <vat>0.27</vat>
        <quantity>1</quantity>
      </elem>
    </products>
  </order>
</request>

Response (example):

<?xml version="1.0" encoding="utf-8"?>
<response>
  <status>success</status>
  <message>
    <elem>The order creation was successful</elem>
  </message>
  <wspyId>176</wspyId>
</response>

In case of JSON:

Url: https://app.webshippy.com/wspyapi/CreateOrder/json

Request:

{
  "apiKey": "api-key-comes-here",
  "order": {
    "referenceId": "87962-110037",
    "referenceName": "87962-110037",
    "createdAt": "2018-02-14 13:04:33",
    "shipping": {
      "name": "Kov\u00e1ts B\u00e9la",
      "company": "Vir\u00e1g Bt.",
      "email": "bela@viragbt.hu",
      "phone": "+36301234567",
      "countryCode": "HU",
      "stateOrProvinceCode": "",
      "zip": "1234",
      "city": "Budapest",
      "address1": "Vir\u00e1g utca 25.",
      "address2": "",
      "note": "",
      "mode": "GLS"
    },
    "billing": {
      "name": "Kov\u00e1ts B\u00e9la",
      "company": "Vir\u00e1g Bt.",
      "phone": "+36301234567",
      "countryCode": "HU",
      "zip": "1234",
      "city": "Budapest",
      "address1": "Vir\u00e1g utca 25.",
      "address2": ""
    },
    "payment": {
      "paymentMode": "COD",
      "codAmount": "1500.00",
      "paymentStatus": "pending",
      "paidDate": "",
      "shippingPrice": "1290.00",
      "shippingVat": "0.27",
      "currency": "HUF",
      "discount": "1000.00"
    },
    "products": [
      {
        "sku": "szuperhos-polo-piros-xl",
        "productName": "Szuperh\u0151s P\u00f3l\u00f3",
        "variantName": "Piros, XL",
        "priceGross": "1890.00",
        "vat": "0.27",
        "quantity": "3"
      },
      {
        "sku": "cicanaci-one-size",
        "productName": "CicaNaci - One Size",
        "priceGross": "990.00",
        "vat": "0.27",
        "quantity": "1"
      },
      {
        "sku": "akcios-sapka",
        "productName": "Akci\u00f3s sapka",
        "variantName": "Fekete",
        "priceGross": "1990.00",
        "vat": "0.27",
        "quantity": "1"
      }
    ]
  }
}

Response (example):

{
  "status": "success",
  "message": [
    "The order creation was successful"
  ],
  "wspyId": 176
}

Additional response possibilities:

  • The order creation was successful

  • The order modification was successful

Order's delete

In case of JSON:

Url: https://app.webshippy.com/wspyapi/deleteOrder/json

Request:

{
  "apiKey": "api-key-comes-here",
  "filters": {
    "wspyId": "917872738"
  }
}

In case of XML:

Url: https://app.webshippy.com/wspyapi/deleteOrder/xml

Request:

<?xml version="1.0" encoding="utf-8"?>
<request>
 <apiKey>api-key-comes-here</apiKey>
 <filters>
    <wspyId>917872738</wspyId>
  </filters>
</request>

Filtering terms

Description

wspyId

The Internal ID, API returns it when an order is created

referenceId

External ID, the ID given when an order is created

referenceName

Order's name, the name given when an order is created

Only one order can be deleted at a time! An order which has been manually modified by a user in Webshippy can not be deleted with API request.

Last updated