Upgrade to ChromeUpgrade to FirefoxUpgrade to Internet ExplorerUpgrade to Safari

Orders

Get / List

Description

Retrieves information about all your orders, or a specific order

Url (all orders)

https://api.pwinty.com/v2.2/Orders

Url (specific order)

https://api.pwinty.com/v2.2/Orders/{id}

Method

GET

Sample response

{
    "id": 1065,
    "recipientName": "Tom Smith",
    "address1": "14 Acacia Avenue",
    "address2": "",
    "addressTownOrCity": "Cardiff",
    "stateOrCounty": "Glamorgan",
    "postalOrZipCode": "CF11 1AB",
    "countryCode": "GB",
    "destinationCountryCode": "GB",
    "price": 1292,
    "shippingInfo" : 
                    {
                        "price" : 12,
                        "shipments" : 
                        [
                            {
                                "shipmentId" : 321,
                                "trackingNumber" : "123456",
                                "trackingUrl" : "http://www.ups.com/track?123456",
                                "isTracked" : true,
                                "earliestEstimatedArrivalDate" : "2015-02-19T12:50:59.175116Z",
                                "latestEstimatedArrivalDate" : "2015-02-24T12:50:59.175116Z"
                            }
                        ]
                    }
    "status" : "NotYetSubmitted",
    "payment" : "InvoiceRecipient",
    "paymentUrl" : "https://checkout.pwinty.com/Pay?paymentRef=12345",
    "qualityLevel" : "Pro"
    "photos": [
        {
            ...See Photos (GET) for details
        }
    ]
}

Return fields

Field Description
id Unique integer identifying the order
recipientName Who the order will be addressed to
address1 First line of recipient address
address2 Second line of recipient address
addressTownOrCity Town/City of recipient address
stateOrCounty State (US) or County (UK) of recipient address
postalOrZipCode Postal/Zipcode of recipient address
countryCode Country Code of where the order will be printed
destinationCountryCode Country Code of where the order will be shipped to
price How much Pwinty will charge you for this order
status Status of order. Can be NotYetSubmitted, Submitted,AwaitingPayment or Complete, or Cancelled
shippingInfo Shipping object showing how the order will be shipped
payment Payment option for order, can be either InvoiceMe or InvoiceRecipient
paymentUrl If payment is set to InvoiceRecipient then the url the customer should be sent to to complete payment
qualityLevel Quality level for the order, can be either Pro or Standard
photos An array of objects representing the photos in the order. For structure of these objects see /Photos (GET)
 

Shipping object

Orders of multiple product types may be automatically split into separate sub-orders and processed individually.
When this is the case we will provide details of all the shipments within a shippingInfo object as an array of shipping objects.
The shippingInfo object will also contain a price which represents the price of the entire shipment.
Note that until an order has been submitted and the photographic assets verified by our system, the shipmentId will be null.

ShippingInfo

Field Description
price integer- the cost of this shipment
shipments An array of shipment objects

Shipment

Field Description
shipmentId String- the unique identifier for this shipment. Null if order hasn't been submitted
isTracked Boolean- denoting whether the order will be tracked
trackingNumber String- Tracking number when available
trackingUrl String- Tracking Url when available
earliestEstimatedArrivalDate Date/Time- estimated earliest arrival of shipment*
latestEstimatedArrivalDate Date/Time- estimated latest arrival of shipment*
shippedOn Date/Time- the shipping date. Null if the order hasn't been shipped
* - arrival estimates are beyond our control and are based on typical seasonal processing times and published shipping times for the shipment method relevant to the order

Errors

  • 404 - The order with the specified id was not found

Create an order

URL

https://api.pwinty.com/v2.2/Orders

Method

POST

Parameters

  • recipientName Who the order should be addressed to
  • address1 1st line of recipient address optional on create, needed by submit
  • address2 2nd line of recipient address optional
  • addressTownOrCity Town or City in the address optional on create, needed by submit
  • stateOrCounty State or County in the address optional on create, needed by submit
  • postalOrZipCode Postal code or Zip code of recipient optional on create, needed by submit
  • countryCode Country code of the country where the order should be printed
  • destinationCountryCode Country code of the country where the order will be shipped optional
  • useTrackedShippingoptional whether to upgrade to a tracked shipping service when available
  • payment Payment option for order, can be either InvoiceMe or InvoiceRecipient
  • qualityLevel Quality Level for order, can be either Pro or Standard

Returns

JSON object representing the new order (see /Orders (GET) for details )

Errors

  • 400 - One of the input parameters was invalid or missing, error message should indicate which one and why

Update an order

URL

https://api.pwinty.com/v2.2/Orders/{id}

Method

PUT

Parameters

  • id the id of the order to update (in URL)
  • recipientName Who the order should be addressed to
  • address1 1st line of recipient address
  • address2optional 2nd line of recipient address
  • addressTownOrCity Town or City in the address
  • stateOrCounty State or County in the address
  • postalOrZipCode Postal code or Zip code of recipient

Return values

JSON object representing the new order (see /Orders (GET) for details

Errors

  • 400 - One of the input parameters was invalid or missing, error message should indicate which one and why
  • 403 - Only orders in state "NotYetSubmitted" can be updated
  • 404 - No order with that id was found