DYP API Help Page


Introduction

Drop Your Product (DYP) API offers a way to send in orders or retrieve order information and statuses:

General Workflow


The general workflow of the API is as follows:
First you should upload the file(s) you want to use in an order through api/UploadFiles
This results in a hash or a list of hashes which you can then use in the api/Order call.
In this call you should add the appropriate hash to the correct product by using the ProductId, that you receive from the api/Product call, combined with the amount of times (count) you want to order this specific product.
We also expect the billing address and, in case of a different shipping address, the shipping address.
For each call you can find the specifications and required data in the overview below.

After sending in an order it is possible to retrieve the current order status by calling Order/{id}. This will return the current order status.

Authentication

All API requests require an Authorization header using basic authentication containing a Base64 String: emailaddress:apikey
For our test API-user use: test@test.nl:404f7ffc-313f-405c-8012-08ec06171e3c which results in Base64 string dGVzdEB0ZXN0Lm5sOjQwNGY3ZmZjLTMxM2YtNDA1Yy04MDEyLTA4ZWMwNjE3MWUzYw==

Postman Examples

Postman is a popular API client that makes it easy for developers to create, share, test and document APIs.
We use Postman to show real examples of our API.



Use the import function of Postman to import our example project:
https://dyp-staging.fujifilm-imaging.nl/PostManCollection/DropYourProduct.postman_collection.json

Callback

It's possible to add a callback url in your order request, this callback url will receive order updates.
These updates will be send by POST in JSON format. For example:
If the first request doesn't succeed (no HTTP code 200) we will send the code 2 more times with 30 seconds intervals

Accepted: Order has been received in production
Shipped: Order has been send to customer, the TrackingCode will contain the tracking code
Error: Order in error because of reason specified in Message


    {
 "OrderID": "987654",
 "ExternalID": "1234567890123456",
 "Status": "SHIPPED",
 "Message": "SHIPPED",
 "TrackingCode": "TT123456",
 "OrderBarcodes": [
   {
     "BarcodeValue": "?f=abcdef12-3456-7890-abcd-ef1234567890",
     "ProductId": 1,
     "ProductName": "10X15G",
     "Attachments": [
      "a1b2c3d4-e5f6-789a-bcde-f123456789ab",
      "4d5e6f78-90ab-cdef-1234-56789abcdef0"
    ],
   "Quantity": 2
  }
 ]
}

In case an order is partially shipped the OrderBarcodes will contain only the products that have been shipped



Methods

For a detailed description of all methods and needed data please look through our documentation below

UploadFiles

APIDescription
POST api/UploadFiles

To send in your photo files, returns attachmentID that should be used to attach the photo product to an order This can be either fully rendered PDF's for multipage products or PDF and image files for single products. When a PDF is uploaded no checks are done by the API. If the PDF is not according to spec the order will fail in a later stage, we will send you a message by the provided callback URL

POST api/UploadFiles/UploadPdfPrintFilesForPrints

This function

Product

APIDescription
GET api/Product

Returns product catalog, including productIDs and information of the different products that can be ordered.

GET api/Product/{actionname}

Returns product catalog, including productIDs and information of the different products that can be ordered.

Health

Can be used to check the health of the API

APIDescription
GET api/Health

Will return the health of the API, returns this in case the API is healthy: "API is Healthy"

GET api/Health/{actionname}

Will return the health of the API, returns this in case the API is healthy: "API is Healthy"

Order

APIDescription
POST api/Order

Creates a new order, returns this orders information

GET api/Order?results={results}&page={page}

No documentation available.

GET api/Order/{id}

Retrieves order information on the orderID

GET api/Order?externalID={externalID}

Retrieves order information by external ID

POST api/Order/{actionname}

Creates a new order, returns this orders information

GET api/Order/{actionname}?results={results}&page={page}

No documentation available.

GET api/Order/{actionname}/{id}

Retrieves order information on the orderID

GET api/Order/{actionname}?externalID={externalID}

Retrieves order information by external ID