It's really easy to get up and running with Pwinty

Place your first order

  1. Create an Order
    Make a POST call to /Orders . Get back the order id, which you will need for adding photos to the order. If you don't have the address don't worry- create the order without the address parameters, and update it later in the process

    curl https://sandbox.pwinty.com/v2.1/Orders \
       -H "X-Pwinty-MerchantId: YourMerchantId" \
       -H "X-Pwinty-REST-API-Key: YourAPIKey" \
       -d countryCode=GB \
       -d qualityLevel=Pro \
       -d useTracked=true \
       -d recipientName=Mr%20Jones \
       -d address1=The%20Hollies \
       -d addressTownOrCity=Cardiff \
       -d stateOrCounty=Glamorgan \
       -d postalOrZipCode=CF11%201AX \
    
    RESPONSE:
    {
        "id": 1065,
        "countryCode": "GB",
        "qualityLevel": "Pro",
        "recipientName": "Mr Jones",
        "address1": "The Hollies",
        "address2": "",
        "addressTownOrCity": "Cardiff",
        "stateOrCounty": "Glamorgan",
        "postalOrZipCode": "CF11 1AX",
        "payment" : "InvoiceMe",
        "countryCode": "GB",
        "status" : "NotYetSubmitted",
        "photos": [],
        "shippingInfo" : {
            isTracked : true,
            trackingUrl: null,
            trackingNumber: null
        }
    }
                        
  2. Add photos to the order
    Make POST calls to Orders/{orderId}/Photos . Either give us a URL to find the photo, or send it as part of the POST

    curl https://sandbox.pwinty.com/v2.1/Orders/1065/Photos \
        -H "X-Pwinty-MerchantId: YourMerchantId" \
        -H "X-Pwinty-REST-API-Key: YourAPIKey" \
        -d type=8x12 \
        -d url=http%3A%2F%2Fwww.testserver.com%2Faphoto.jpg \
        -d md5Hash="79054025255fb1a26e4bc422aef54eb4"
        -d copies=2 \
        -d sizing=Crop             
                        
  3. Check the order is valid
    Make a GET call to /Orders/SubmissionStatus to check the order is valid and ready to be submitted

    curl https://sandbox.pwinty.com/v2.1/Orders/1065/SubmissionStatus
        -H "X-Pwinty-MerchantId: YourMerchantId" \
        -H "X-Pwinty-REST-API-Key: YourAPIKey" \
    RESPONSE:
    {
        "id": 1065,
        "isValid": true,                 
        "generalErrors : [],
        "photos" : []
     }
                        
  4. Submit the order
    Make a POST call to /Orders/1065/Status to set the Status to "Submitted"

    curl https://sandbox.pwinty.com/v2.1/Orders/6961/Status
        -H "X-Pwinty-MerchantId: YourMerchantId" \
        -H "X-Pwinty-REST-API-Key: YourAPIKey" \ 
        -d status=Submitted                 
                        
  5. Relax
    We'll get your order printed, and shipped to your customer in no time

  6. Pay (we're afraid so!)
    When your account balance gets to a certain level, we'll invoice you

Place your first order

  1. Create an Order
    Make a POST call to /Orders . Get back the order id, which you will need for adding photos to the order. If you don't have the address don't worry- create the order without the address parameters, and update it later in the process

    curl https://sandbox.pwinty.com/v2.1/Orders \
       -H "X-Pwinty-MerchantId: YourMerchantId" \
       -H "X-Pwinty-REST-API-Key: YourAPIKey" \
       -d countryCode=GB \
       -d qualityLevel=Pro \
       -d useTracked=true \
       -d recipientName=Mr%20Jones \
       -d address1=The%20Hollies \
       -d addressTownOrCity=Cardiff \
       -d stateOrCounty=Glamorgan \
       -d postalOrZipCode=CF11%201AX \
       -d payment=InvoiceRecipient
    
    RESPONSE:
    {
        "id": 1065,
        "countryCode": "GB",
        "qualityLevel": "Pro",
        "recipientName": "Mr Jones",
        "address1": "The Hollies",
        "address2": "",
        "addressTownOrCity": "Cardiff",
        "stateOrCounty": "Glamorgan",
        "postalOrZipCode": "CF11 1AX",
        "countryCode": "GB",
        "status" : "NotYetSubmitted",
        "photos": [],
        "payment" : "InvoiceRecipient",
        "paymentUrl" : "https://checkout.pwinty.com/Pay?paymentRef=12345,
        "qualityLevel" : "Pro"
        "shippingInfo" : {
            isTracked : true,
            trackingUrl: null,
            trackingNumber: null
        }
    }
                        
  2. Add photos to the order
    Make POST calls to Orders/{orderId}/Photos . Either give us a URL to find the photo, or send it as part of the POST

    curl https://sandbox.pwinty.com/v2.1/Orders/1065/Photos \
        -H "X-Pwinty-MerchantId: YourMerchantId" \
        -H "X-Pwinty-REST-API-Key: YourAPIKey" \
        -d type=8x12 \
        -d url=http%3A%2F%2Fwww.testserver.com%2Faphoto.jpg \
        -d md5Hash="79054025255fb1a26e4bc422aef54eb4"
        -d copies=2
        -d priceToUser=299
        -d sizing=Crop             
                        
  3. Check the order is valid
    Make a GET call to /Orders/SubmissionStatus to check the order is valid and ready to be submitted

    curl https://sandbox.pwinty.com/v2.1/Orders/1065/SubmissionStatus
        -H "X-Pwinty-MerchantId: YourMerchantId" \
        -H "X-Pwinty-REST-API-Key: YourAPIKey" \
    RESPONSE:
    {
        "id": 1065,
        "isValid": true,                 
        "generalErrors : [],
        "photos" : []
     }
                        
  4. Set the order to AwaitingPayment
    Make a POST call to /Orders/1065/Status to set the Status to "AwaitingPayment"

    curl https://sandbox.pwinty.com/v2.1/Orders/6961/Status
        -H "X-Pwinty-MerchantId: YourMerchantId" \
        -H "X-Pwinty-REST-API-Key: YourAPIKey" \ 
        -d status=AwaitingPayment                 
                        
  5. Redirect your user to our checkout
    Use the value we supplied for 'paymentUrl' to redirect your user to our checkout. We'll take care of the rest

  6. Relax
    We'll send the customer an email confirmation of their payment, get your order printed, and shipped to your customer in no time. We'll pay out the profit on your orders to you every month