Order API
Order-related API features
Order requests
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)"
]
}
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.
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>
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