API Reference

User Validation API

Use this API to validate the Customer’s userID against the Product to be distributed

Overview

The User Validation API allows the Partner to validate the userId of their customer against the requirements of the Product. Some products require an in app userID or identifier; others require just a valid email address. We call the first identifier the recipient identifier.

Pre Requisites

API Description

Headers

HeaderDescription/Value
AccessTokenThis is the Access Token field returned from the Authentication - Generate Access Token response. This should be in the format Bearer <AccessToken>
Content-Typeapplication/vnd.carry1st.order.distributor+json

URL Format

To retrieve a list of available payment methods, make a GET request to the following endpoint:

  • GET /api/orders/distributors/user-validation?recipientIdentifier=?&productBundleSku=?&externalReference=?&countryCode=?&currencyCode=?&amount=?&quantity=?

List of URL Query Parameters

ParameterFormatMandatoryDescription
recipientIdentifierStringYThe userId of the customer that exists on the platform of the Product
productBundleSkuStringYThis is the SKU value that is obtained from the List Product Catalog API
externalReferenceStringYAn externalReference to provide to the Product
countryCodeStringYThe country code. It should match the Product Bundle output in List Catalog API
currencyCodeStringYThe currency code. It should match the Product Bundle output in List Catalog API
amountNumberYThe amount. It should match the Product Bundle output in List Catalog API
quantityNumberYThe quantity. This should always be 1

Response

The API will respond with a JSON object.

{
   "recipientIdentifier": "GEDKZW",
   "productBundleSku": "codm30cp",
   "externalReference": "test",
   "customerInfo": {
       "openId": "14318806390642915925",
       "nickName": "Char",
       "picUrl": "https://graph.facebook.com/v19.0/115897970854428/picture?width",
       "country": "Qatar"
   },
   "quantity": 1,
   "amount": 10,
   "currencyCode": "USD",
   "countryCode": "QA"
}

Fields

NameTypeDescription
recipientIdentifierStringThe userId of the customer that exists on the platform of the Product
productBundleSkuStringThis is the SKU value that is obtained from the List Product Catalog API
externalReferenceStringAn externalReference to provide to the Product
countryCodeStringThe country code. It should match the Product Bundle output in List Catalog API
currencyCodeStringThe currency code. It should match the Product Bundle output in List Catalog API
amountNumberThe amount. It should match the Product Bundle output in List Catalog API
customerInfoJson <Key, Value Pairs>An object that returns more detailed information about the recipientIdentifier. This is not guaranteed to be returned in all Products

HTTP Response Codes

The User Validation API may return the following HTTP Response Codes:

HTTP Status CodeNameDescription
200SuccessThis indicates that the request has been successful
400Bad RequestThe recipientId could be invalid or missing from the request
401UnauthorizedThe Access Token might be missing or invalid (see Authentication - Generate Access Token)
403ForbiddenThe credentials provided might not have access to the resources required
404Not FoundThe productBundleSku is incorrectly referenced

Error Handling

See Handling Error Codes for more details on handling error responses.