Purchase

Update

PUT method to update a purchase

Parameters

Name Description
account_id required Your account unique identifier to access API.
purchase_id required Id of the purchase
campaign_id Id of the campaign
status Status of the purchase. Only the following status are allowed: add_cart, purchase, remove_cart, product_view, product_refund, purchase_failed, canceled, no_show, no_paid, check_in, check_out, reserved, confirmed
redeem_coupon_code Coupon code used in the purchase
transaction_code Transaction code of the purchase of your backend
name Name of the purchase transaction
description Description of the purchase transaction
price Price of the purchase transaction
currency Currency of the purchase transaction
error_message Custom error message if purchase failed

Request

Route
PUT 
/v2/account/:account_id/purchases/:purchase_id
Headers
Accept: application/json 
Authorization: Token token={account.secret}
Content-Type: application/json
Body
{
  "campaign_id": "57680042edb7aad202000005",
  "status": "purchase",
  "transaction_code": "4230923jda023230",
  "UUID": "3210938120313912312",
  "name": "Iphone6",
  "price": 748.45,
  "currency": "EUR",
  "description": "3D Touch. 12MP photos. 4K video.One powerful phone."
}

Response

Status
200
Body
{
  "created_at": "2016-06-22T10:37:34Z",
  "id": "576a6a6eedb7aab9c2000006",
  "status": "purchase",
  "contact_id": "57680042edb7aad202000001",
  "campaign_id": "57680042edb7aad202000005",
  "product_UUID": "3210938120313912312"
}