Add Redemption Fulfillment Information

Request Details

Item Value
Description This endpoint will allow client to add fulfillment information for a particular redemption.
Method POST
Endpoint https://[environment]api[client_id].crowdtwist.com/v2/users/[user_id]/redemption/[redemption_id]/
fulfillment?api_key=[api_key]&id_type=[id_type]
Content Type application/json

Request

Field Name Sample Value Required Format Description
URL PARAMETERS
user_id alice@crowdtwist.com Yes String User ID of the user for whom the reward will be redeemed.
The user ID can be:
– Email Address
– Facebook User ID
– Twitter User ID
– CrowdTwist ID
– Third Party ID
– Username
– Mobile Phone Number
redemption_id 6575765 Yes Integer This is the redemption order id obtained via redemption push.
QUERY PARAMETERS
api_key QWERTYUIOP Yes String  
id_type email No String Type of ID being sent, defaults will be Crowdtwist ID if not specified.
The type of ID can be:
– email
– facebook_user_id
– twitter_user_id
– id (CrowdTwist ID) – default ID if id_type is not specified
– third_party_id
– username
– mobile_phone_number


Request Body

Field Name Sample Value Required Format Description
tracking_number ABFTGDB34352 Yes String This is the shipment tracking number.
vendor_name UPS Yes String This is the shipment vendor.
fulfillment_date "2012-04-23T18:25:43Z" Yes String This is the date when item was fulfilled.
quantity 3 Yes Integer This is the quantity of reward fulfilled.

Response

Response Body

Field Name Sample Value Required Format Description
fulfillment_id 46445665 Yes Integer This is the identifier which uniquely identifies a fulfillment record.
reward_id 64256446 Yes Integer This is the variation ID of the reward.
tracking_number ABFTGDB34352 Yes String This is the shipment tracking number.
vendor_name UPS Yes String This is the shipment vendor.
fulfillment_date "2012-04-23T18:25:43Z" Yes String This is the date when item was fulfilled.
quantity 3 Yes Integer This is the quantity of reward fulfilled.


Error Responses

Field Name Sample Value Required Format Description
error Field value is empty. Yes String This is a short form of the error.
message Value of field [fieldname] must not be empty. Yes String This is a detailed message around the error specifying, as specifically as possible, what the fields are that are missing or where exactly the error is.


Error Response Codes

Error Error Code Description Reason
Input Error 4xx Returned whenever the request is missing required fields, including situations in which the body is malformed (e.g. HTTP method not supported, receipt not found, etc.). – missing_data
– not_unique
– receipt_not_found
– invalid_amount
– invalid_currency
– invalid_date
– invalid_custom_field
– invalid
Server Error 5xx HTTP error status code is returned due to an error that occurred in the backend. – internal_error: unexpected error occurred in the CrowdTwist backend
– missing_field
– invalid_data
– not_configured: error occurs when an configuration has not been configured yet


Example Response Codes

Response Code Error Message
404 page_not_found User does not exist.
404 not_found Redemption not found.
400 required_property_missing Missing [fieldname] required field.

Samples

Sample Request

https://api.crowdtwist.com/v2/users/1232/redemption/656343/fulfillment?api_key=[api_key]


Sample Request Body

{ "tracking_number": "XY564F756757", "vendor_name": "UPS", "fulfillment_date": "2012-04-23T18:25:43Z", "quantity": 3 }


Sample Response Body

{ "fulfillment_id": 4689568, "reward_id": 56984, "quantity": 3, "tracking_number": "XY564F756757", "vendor_name": "UPS", "fulfillment_date": "2012-04-23T18:25:43Z" }


Sample Error Response

{ "error": "not_found", "message": "Redemption not found." }