Only one field is required when creating a new order object: the order id. The order id that you send to Vift when creating a new order becomes the unique identifier for that order object. This is beneficial to you because you do not need to store the uuid generated by Vift. All subsequent calls to our API will use the customer's order id that you already use to reference their order.

For example, the following request, which creates a new order:

curl -i https://api.vift.com/orders \
		 -u YOUR_APP_ID:YOUR_API_KEY \
		 -H "Content-Type: application/json" \
     -X POST \
     -d '{
				   "id": "YOUR_ORDER_ID",
           "name": "John Doe",
  				 "email": "[email protected]",
           "price": 199
         }'

will allow you to access the order via this URL:

https://api.vift.com/orders/YOUR_ORDER_ID

which will respond with the order object (when properly authenticated):

{
  "id": "YOUR_ORDER_ID",
  "uuid": "d41dfd35-461f-4e04-816b-d6bcf5ed30a7",
  "name": "John Doe",
  "email": "[email protected]",
  "recipient_name": null,
  "recipient_email": null,
  "recipient_phone": null,
  "record_url": "https://vift.com/record/d41dfd35-461f-4e04-816b-d6bcf5ed30a7",
  "playback_url": null,
  "send_method": null,
  "send_trigger": null,
  "send_on": null,
  "carrier": null,
  "tracking_number": null,
  "delivered": "0",
  "video_title": null,
  "video_duration": null,
  "video_processed": "0",
  "price": 199,
  "status": "new",
  "created_at": "2015-01-01T00:00:00Z",
  "updated_at": "2015-01-01T00:00:00Z",
  "recorded_at": null,
  "delivered_at": null,
  "sent_at": null,
  "viewed_at": null
}

After creating a new order, your next step is Handling the Delivery Notification.

📘

Note that the name, email, recipient_name, recipient_email, and price fields are optional when creating a new order.

If the customer's name and email (of sender/purchaser), and recipient_name and recipient_email (of gift recipient) are set for a new order, the fields will be pre-populated for the customer after they record their video message on vift.com.

The price field must be in cents. It should contain the price that was charged to the customer for the Vift Video Gift Message. For accounts using a revenue share payment plan, this price will be used for billing. For accounts using a license fee payment plan - this is unnecessary.