Sending GET request to this url, returns collection of ORDERS resources that belong to given shop.
You can narrow down list of resources by passing proper query parameters (list of which you can find below in request params section). You can basically search by:
- description
- status
- externalId
- createdOn
`description` fields can be a pattern and we will try to match this phrase.
You can specify which page of results you want and how many results per page should be there. You can also specify sort-order using one or more of allowed fields (listed below in request params section).
Last but not least you can even specify which fields from resource you want to get. If you pass param `fields` with list of fields (separated by comma [,]) we will return list of resources with only those fields (we will always add resource id to ensure that you can use that data later on)
Returns status code
200
Request url
/shops/p/orders?query[description]=foo&query[status]=active&query[createdOn][from]=2010-10-13&query[createdOn][to]=2020-03-15
Request params
Field name | Field type | Field description |
---|
query | hash | Used to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.Key | Possible values if fixed |
---|
description | * | externalId | * | createdOn | createdOn[from]={Y-m-d}&createdOn[to]={Y-m-d} - It can be also UTC format | status | * |
|
fields | string | List of fields that should be returned. Id is always returned. Fields should be separated by comma |
sort | hash | Enable sorting using specified field (set as a key) and order (set as a value). You can specify multiple fields to sort by.Key | Possible values if fixed |
---|
createdOn | asc,desc |
|
perPage | int | Number results on page |
page | int | Page number |
Example Response
[
{
"orderId": "p",
"href": "https://api.getresponse.com/v3/shops/p/orders/p",
"description": "xsildbdlxmzduukgeativvgoggmsjughmosqqvcoibsdwcjadd",
"totalPrice": 113,
"totalPriceTax": 291,
"currency": "PLN",
"externalId": "DH71239",
"orderUrl": "http://somedomain.com/orders/123",
"cartId": null,
"billingAddress": {
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58da43fc02c24",
"firstName": "firstName-58da43fc02c3f",
"lastName": "lastName-58da43fc02c52",
"address1": "address1-58da43fc02c66",
"address2": "address2-58da43fc02c74",
"city": "city-58da43fc02c82",
"zip": "zip-58da43fc02c90",
"province": "province-58da43fc02ca5",
"provinceCode": "provinceCode-58da43fc02cb4",
"phone": "0048111111111",
"company": "company-58da43fc02cc0",
"href": "https://api.getresponse.com/v3/addresses/Th",
"createdOn": "2017-03-28T11:07:37+0000",
"updatedOn": "2017-03-28T11:07:38+0000"
},
"shippingAddress": {
"addressId": "Th",
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58da43fc02c24",
"firstName": "firstName-58da43fc02c3f",
"lastName": "lastName-58da43fc02c52",
"address1": "address1-58da43fc02c66",
"address2": "address2-58da43fc02c74",
"city": "city-58da43fc02c82",
"zip": "zip-58da43fc02c90",
"province": "province-58da43fc02ca5",
"provinceCode": "provinceCode-58da43fc02cb4",
"phone": "0048111111111",
"company": "company-58da43fc02cc0",
"href": "https://api.getresponse.com/v3/addresses/Th",
"createdOn": "2017-03-28T11:07:37+0000",
"updatedOn": "2017-03-28T11:07:38+0000"
},
"status": "NEW",
"selectedVariants": [
{
"selectedVariantId": "Vt",
"variantId": "Vt",
"quantity": 94,
"price": 338,
"priceTax": 100,
"taxes": [
{
"taxId": "6G",
"href": "https://api.getresponse.com/v3/shops/p/taxes/6G",
"name": "tax-58da43fc02d7d",
"rate": 52
},
{
"taxId": "86",
"href": "https://api.getresponse.com/v3/shops/p/taxes/86",
"name": "tax-58da43fc02d96",
"rate": 46
}
]
}
],
"metaFields": [
{
"metaFieldId": "86",
"href": "https://api.getresponse.com/v3/shops/p/meta-fields/86",
"name": "metaField-58da43fc02dac",
"value": "SUPER PROMO",
"valueType": "string"
},
{
"metaFieldId": "yD",
"href": "https://api.getresponse.com/v3/shops/p/meta-fields/yD",
"name": "metaField-58da43fc02dd3",
"value": "SUMMER SELL",
"valueType": "string"
}
],
"contactId": "QBNgBR",
"billingStatus": "PAID"
}
]
Possible Errors
Method returns ORDER according to given orderId in context of given shopId
Returns status code
200
Request url
/shops/V/orders/p?fields=description
Request params
Field name | Field type | Field description |
---|
fields | string | List of fields that should be returned. Id is always returned. Fields should be separated by comma |
Example Response
{
"orderId": "p",
"href": "https://api.getresponse.com/v3/shops/p/orders/p",
"description": "xsildbdlxmzduukgeativvgoggmsjughmosqqvcoibsdwcjadd",
"totalPrice": 113,
"totalPriceTax": 291,
"currency": "PLN",
"externalId": "DH71239",
"orderUrl": "http://somedomain.com/orders/123",
"cartId": null,
"billingAddress": {},
"shippingAddress": {
"addressId": "Th",
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58da43fc02c24",
"firstName": "firstName-58da43fc02c3f",
"lastName": "lastName-58da43fc02c52",
"address1": "address1-58da43fc02c66",
"address2": "address2-58da43fc02c74",
"city": "city-58da43fc02c82",
"zip": "zip-58da43fc02c90",
"province": "province-58da43fc02ca5",
"provinceCode": "provinceCode-58da43fc02cb4",
"phone": "0048111111111",
"company": "company-58da43fc02cc0",
"href": "https://api.getresponse.com/v3/addresses/Th",
"createdOn": "2017-03-28T11:07:37+0000",
"updatedOn": "2017-03-28T11:07:38+0000"
},
"status": "NEW",
"selectedVariants": [
{
"selectedVariantId": "Vt",
"variantId": "Vt",
"quantity": 94,
"price": 338,
"priceTax": 951,
"taxes": [
{
"taxId": "6G",
"href": "https://api.getresponse.com/v3/shops/p/taxes/6G",
"name": "tax-58da43fc02d7d",
"rate": 52
},
{
"taxId": "86",
"href": "https://api.getresponse.com/v3/shops/p/taxes/86",
"name": "tax-58da43fc02d96",
"rate": 46
}
]
}
],
"metaFields": [
{
"metaFieldId": "86",
"href": "https://api.getresponse.com/v3/shops/p/meta-fields/86",
"name": "metaField-58da43fc02dac",
"value": "SUPER PROMO",
"valueType": "string"
},
{
"metaFieldId": "yD",
"href": "https://api.getresponse.com/v3/shops/p/meta-fields/yD",
"name": "metaField-58da43fc02dd3",
"value": "SUMMER SELL",
"valueType": "string"
}
],
"contactId": "QBNgBR",
"billingStatus": "PAID"
}
Possible Errors
Sending a POST request to this url, will create a new ORDER resource.
In order to create a new ORDER, you need to send ORDER resource in BODY of the request (remember that you need to serialize body into JSON string)
Returns status code
201
Request url
/shops/V/orders?additionalFlags=skipAutomation
Request params
Field name | Field type | Field description |
---|
additionalFlags | string | Additional flags parameter with value 'skipAutomation' will skip the triggering automation's 'Make a purchase' element. |
Example Request Body
{
"contactId": "QBNgBR",
"totalPrice": 716,
"totalPriceTax": 358,
"currency": "PLN",
"externalId": "DH71239",
"orderUrl": "http://somedomain.com/orders/123",
"cartId": null,
"billingAddress": {
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58de15b0cb01d",
"firstName": "firstName-58de15b0cb02f",
"lastName": "lastName-58de15b0cb03f",
"address1": "address1-58de15b0cb051",
"address2": "address2-58de15b0cb065",
"city": "city-58de15b0cb0dd",
"zip": "zip-58de15b0cb16d",
"province": "province-58de15b0cb1b5",
"provinceCode": "provinceCode-58de15b0cb229",
"phone": "0048111111111",
"company": "company-58de15b0cb24a"
},
"shippingAddress": {
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58de15b0caf1b",
"firstName": "firstName-58de15b0caf3f",
"lastName": "lastName-58de15b0caf57",
"address1": "address1-58de15b0caf6d",
"address2": "address2-58de15b0caf7f",
"city": "city-58de15b0caf9c",
"zip": "zip-58de15b0cafba",
"province": "province-58de15b0cafd6",
"provinceCode": "provinceCode-58de15b0caff0",
"phone": "0048111111111",
"company": "company-58de15b0cb005"
},
"status": "NEW",
"selectedVariants": [
{
"variantId": "p",
"quantity": 84,
"price": 940,
"priceTax": 428,
"taxes": [
{
"name": "tax-58de15b0cb31d",
"rate": 82
},
{
"name": "tax-58de15b0cb32d",
"rate": 46
}
]
}
],
"metaFields": [
{
"name": "metaField-58de15b0cb33e",
"value": "SUPER PROMO",
"valueType": "string"
},
{
"name": "metaField-58de15b0cb350",
"value": "SUMMER SELL",
"valueType": "string"
}
],
"billingStatus": "PAID",
"processedAt": "2017-06-26T12:50:50+0000"
}
Body params
Field name | Field type | Field description |
---|
contactId (required) | string | Id of contact that made order, You must first create contact by POSTING to /v3/contacts or if it already exists then GET it with /v3/contacts |
totalPrice (required) | float | total price of order |
totalPriceTax | float | Total price tax of order |
orderUrl | string | External url to order |
externalId | string | Order external ID |
currency (required) | string | Order currency - ISO 4217 |
status | string | Status value |
cartId | string | Id of cart on which order was based, You must first create one by POSTING to /v3/shops/{shopsId}/carts |
description | string | Order description |
shippingPrice | float | Order shipping price |
billingStatus | string | Order billing status |
processedAt | datetime | Exact order time. Format: Y-m-dTH:i:sO |
shippingAddress | collection | Order shipping addressField name | Field type | Field description |
---|
countryCode (required) | string | ISO-3166-1 alpha-3 country code | name (required) | string | Address name | firstName | string | max 64 chars | lastName | string | max 64 chars | address1 | string | max 255 chars | address2 | string | max 255 chars | city | string | max 128 chars | zip | string | max 64 chars, any format | province | string | max 255 chars, any format | provinceCode | string | max 64 chars | phone | string | max 255 chars, any format | company | string | max 128 chars |
|
billingAddress | collection | Order billing addressField name | Field type | Field description |
---|
countryCode (required) | string | ISO-3166-1 alpha-3 country code | name (required) | string | Address name | firstName | string | max 64 chars | lastName | string | max 64 chars | address1 | string | max 255 chars | address2 | string | max 255 chars | city | string | max 128 chars | zip | string | max 64 chars, any format | province | string | max 255 chars, any format | provinceCode | string | max 64 chars | phone | string | max 255 chars, any format | company | string | max 128 chars |
|
selectedVariants (required) | collection | Collection of selected product variantsField name | Field type | Field description |
---|
variantId (required) | string | Id of selected variant, You must first create variant by POSTING to /v3/shops/{shopsId}/products or /v3/shops/{shopsId}/products/{productsId}/variants | price (required) | float | Product variant price | priceTax | float | Product variant price tax | quantity (required) | integer | Product variant quantity | taxes | collection | Collection of taxes for order product variantField name | Field type | Field description |
---|
name (required) | string | Tax name | rate (required) | float | Tax rate |
|
|
metaFields | collection | Collection of order meta fieldsField name | Field type | Field description |
---|
name (required) | string | Name, minLength=3, maxLength=63 | value (required) | string | Meta value , minLength=0, maxLength=65000 | valueType (required) | string | One of values: 'string' or 'integer' | description | string | Meta description minLength=0, maxLength=255 |
|
Example Response
{
"orderId": "nQ",
"href": "https://api.getresponse.com/v3/shops/p/orders/nQ",
"description": "",
"totalPrice": 716,
"totalPriceTax": 358,
"currency": "PLN",
"externalId": "DH71239",
"orderUrl": "",
"cartId": null,
"billingAddress": {
"addressId": "5f",
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58de15b0cb01d",
"firstName": "firstName-58de15b0cb02f",
"lastName": "lastName-58de15b0cb03f",
"address1": "address1-58de15b0cb051",
"address2": "address2-58de15b0cb065",
"city": "city-58de15b0cb0dd",
"zip": "zip-58de15b0cb16d",
"province": "province-58de15b0cb1b5",
"provinceCode": "provinceCode-58de15b0cb229",
"phone": "0048111111111",
"company": "company-58de15b0cb24a",
"href": "https://api.getresponse.com/v3/addresses/5f",
"createdOn": "2017-03-31T11:26:19+0000",
"updatedOn": "2017-03-31T11:26:19+0000"
},
"shippingAddress": {
"addressId": "Zc",
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58de15b0caf1b",
"firstName": "firstName-58de15b0caf3f",
"lastName": "lastName-58de15b0caf57",
"address1": "address1-58de15b0caf6d",
"address2": "address2-58de15b0caf7f",
"city": "city-58de15b0caf9c",
"zip": "zip-58de15b0cafba",
"province": "province-58de15b0cafd6",
"provinceCode": "provinceCode-58de15b0caff0",
"phone": "0048111111111",
"company": "company-58de15b0cb005",
"href": "https://api.getresponse.com/v3/addresses/Zc",
"createdOn": "2017-03-31T11:26:19+0000",
"updatedOn": "2017-03-31T11:26:19+0000"
},
"status": "NEW",
"selectedVariants": [
{
"selectedVariantId": "Th",
"variantId": "p",
"quantity": 84,
"price": 940,
"priceTax": 428,
"taxes": [
{
"taxId": "PA",
"href": "https://api.getresponse.com/v3/shops/p/taxes/PA",
"name": "tax-58de15b0cb31d",
"rate": 82
},
{
"taxId": "Ok",
"href": "https://api.getresponse.com/v3/shops/p/taxes/Ok",
"name": "tax-58de15b0cb32d",
"rate": 46
}
]
}
],
"metaFields": [
{
"metaFieldId": "G2",
"href": "https://api.getresponse.com/v3/shops/p/meta-fields/G2",
"name": "metaField-58de15b0cb33e",
"value": "SUPER PROMO",
"valueType": "string"
},
{
"metaFieldId": "CM",
"href": "https://api.getresponse.com./v3/shops/p/meta-fields/CM",
"name": "metaField-58de15b0cb350",
"value": "SUMMER SELL",
"valueType": "string"
}
],
"contactId": "QBNgBR",
"billingStatus": "PAID",
"processedAt": "2017-06-26T12:50:50+0000"
}
Possible Errors
Update properties of shops ORDER. You should send only those fields that need to be changed. The rest of properties will stay the same. However In case of billingAddress and shippingAddress You must send entire representation, individual fields cannot be updated. If You want to update individual fields of address You can do so by POSTING to /v3/addresses/{addressId}.
In case of selectedVariants when collection is updated then old one is compoletely removed. Same goes for meta fields. Again in case of those collections individual fields cannot be updated, instead full representations of selectedVariants and metaFields must be sent.
Returns status code
200
Request url
/shops/V/orders/p?additionalFlags=skipAutomation
Request params
Field name | Field type | Field description |
---|
additionalFlags | string | Additional flags parameter with value 'skipAutomation' will skip the triggering automation's 'Make a purchase' element. |
Example Request Body
{
"contactId": "QBNgBR",
"totalPrice": 716,
"totalPriceTax": 358,
"currency": "PLN",
"externalId": "DH71239",
"orderUrl": "http://somedomain.com/orders/123",
"cartId": null,
"billingAddress": {
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58de15b0cb01d",
"firstName": "firstName-58de15b0cb02f",
"lastName": "lastName-58de15b0cb03f",
"address1": "address1-58de15b0cb051",
"address2": "address2-58de15b0cb065",
"city": "city-58de15b0cb0dd",
"zip": "zip-58de15b0cb16d",
"province": "province-58de15b0cb1b5",
"provinceCode": "provinceCode-58de15b0cb229",
"phone": "0048111111111",
"company": "company-58de15b0cb24a"
},
"shippingAddress": {
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58de15b0caf1b",
"firstName": "firstName-58de15b0caf3f",
"lastName": "lastName-58de15b0caf57",
"address1": "address1-58de15b0caf6d",
"address2": "address2-58de15b0caf7f",
"city": "city-58de15b0caf9c",
"zip": "zip-58de15b0cafba",
"province": "province-58de15b0cafd6",
"provinceCode": "provinceCode-58de15b0caff0",
"phone": "0048111111111",
"company": "company-58de15b0cb005"
},
"status": "NEW",
"selectedVariants": [
{
"variantId": "p",
"quantity": 84,
"price": 940,
"priceTax": 428,
"taxes": [
{
"name": "tax-58de15b0cb31d",
"rate": 82
},
{
"name": "tax-58de15b0cb32d",
"rate": 46
}
]
}
],
"metaFields": [
{
"name": "metaField-58de15b0cb33e",
"value": "SUPER PROMO",
"valueType": "string"
},
{
"name": "metaField-58de15b0cb350",
"value": "SUMMER SELL",
"valueType": "string"
}
],
"billingStatus": "PAID",
"processedAt": "2017-06-26T12:50:50+0000"
}
Body params
Field name | Field type | Field description |
---|
contactId | string | Id of contact that made order, You must first create contact by POSTING to /v3/contacts or if it already exists then GET it with /v3/contacts |
totalPrice | float | Total price of order |
totalPriceTax | float | Total price tax of order |
orderUrl | string | External url to order |
externalId | string | Order external ID |
currency | string | Order currency - ISO 4217 |
status | string | Status value |
cartId | string | Id of cart on which order was based, You must first create one by POSTING to /v3/shops/{shopsId}/carts |
description | string | Order description |
shippingPrice | float | Order shipping price |
billingStatus | string | Order billing status |
processedAt | datetime | Exact order time. Format: Y-m-dTH:i:sO |
shippingAddress | collection | Order shipping addressField name | Field type | Field description |
---|
countryCode (required) | string | ISO-3166-1 alpha-3 country code | name (required) | string | Address name | firstName | string | max 64 chars | lastName | string | max 64 chars | address1 | string | max 255 chars | address2 | string | max 255 chars | city | string | max 128 chars | zip | string | max 64 chars, any format | province | string | max 255 chars, any format | provinceCode | string | max 64 chars | phone | string | max 255 chars, any format | company | string | max 128 chars |
|
billingAddress | collection | Order billing addressField name | Field type | Field description |
---|
countryCode (required) | string | ISO-3166-1 alpha-3 country code | name (required) | string | Address name | firstName | string | max 64 chars | lastName | string | max 64 chars | address1 | string | max 255 chars | address2 | string | max 255 chars | city | string | max 128 chars | zip | string | max 64 chars, any format | province | string | max 255 chars, any format | provinceCode | string | max 64 chars | phone | string | max 255 chars, any format | company | string | max 128 chars |
|
selectedVariants | collection | Collection of selected product variantsField name | Field type | Field description |
---|
variantId (required) | string | Id of selected variant, You must first create variant by POSTING to /v3/shops/{shopsId}/products or /v3/shops/{shopsId}/products/{productsId}/variants | price (required) | float | Product variant price | priceTax | float | Product variant price tax | quantity (required) | integer | Product variant quantity | taxes | collection | Collection of taxes for order product variantField name | Field type | Field description |
---|
name (required) | string | Tax name | rate (required) | float | Tax rate |
|
|
metaFields | collection | Collection of order meta fieldsField name | Field type | Field description |
---|
name (required) | string | Name, minLength=3, maxLength=63 | value (required) | string | Meta value , minLength=0, maxLength=65000 | valueType (required) | string | One of values: 'string' or 'integer' | description | string | Meta description minLength=0, maxLength=255 |
|
Example Response
{
"orderId": "nQ",
"href": "https://api.getresponse.com/v3/shops/p/orders/nQ",
"description": "",
"totalPrice": 716,
"totalPriceTax": 358,
"currency": "PLN",
"externalId": "DH71239",
"orderUrl": "",
"cartId": null,
"billingAddress": {
"addressId": "5f",
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58de15b0cb01d",
"firstName": "firstName-58de15b0cb02f",
"lastName": "lastName-58de15b0cb03f",
"address1": "address1-58de15b0cb051",
"address2": "address2-58de15b0cb065",
"city": "city-58de15b0cb0dd",
"zip": "zip-58de15b0cb16d",
"province": "province-58de15b0cb1b5",
"provinceCode": "provinceCode-58de15b0cb229",
"phone": "0048111111111",
"company": "company-58de15b0cb24a",
"href": "https://api.getresponse.com/v3/addresses/5f",
"createdOn": "2017-03-31T11:26:19+0000",
"updatedOn": "2017-03-31T11:26:19+0000"
},
"shippingAddress": {
"addressId": "Zc",
"countryCode": "POL",
"countryName": "Poland",
"name": "name-58de15b0caf1b",
"firstName": "firstName-58de15b0caf3f",
"lastName": "lastName-58de15b0caf57",
"address1": "address1-58de15b0caf6d",
"address2": "address2-58de15b0caf7f",
"city": "city-58de15b0caf9c",
"zip": "zip-58de15b0cafba",
"province": "province-58de15b0cafd6",
"provinceCode": "provinceCode-58de15b0caff0",
"phone": "0048111111111",
"company": "company-58de15b0cb005",
"href": "https://api.getresponse.com/v3/addresses/Zc",
"createdOn": "2017-03-31T11:26:19+0000",
"updatedOn": "2017-03-31T11:26:19+0000"
},
"status": "NEW",
"selectedVariants": [
{
"selectedVariantId": "Th",
"variantId": "p",
"quantity": 84,
"price": 940,
"priceTax": 428,
"taxes": [
{
"taxId": "PA",
"href": "https://api.getresponse.com/v3/shops/p/taxes/PA",
"name": "tax-58de15b0cb31d",
"rate": 82
},
{
"taxId": "Ok",
"href": "https://api.getresponse.com/v3/shops/p/taxes/Ok",
"name": "tax-58de15b0cb32d",
"rate": 46
}
]
}
],
"metaFields": [
{
"metaFieldId": "G2",
"href": "https://api.getresponse.com/v3/shops/p/meta-fields/G2",
"name": "metaField-58de15b0cb33e",
"value": "SUPER PROMO",
"valueType": "string"
},
{
"metaFieldId": "CM",
"href": "https://api.getresponse.com./v3/shops/p/meta-fields/CM",
"name": "metaField-58de15b0cb350",
"value": "SUMMER SELL",
"valueType": "string"
}
],
"contactId": "QBNgBR",
"billingStatus": "PAID",
"processedAt": "2017-06-26T12:50:50+0000"
}
Possible Errors
Returns status code
204
Possible Errors