NAV undefined
undefined
8066701084 (954) 832-8544 wound-dressing 5738512509

You World API v1

Scroll down for Code Samples, example requests and responses. Select a language for Code Samples from the tabs above or the mobile navigation menu.

Get Offers, Brands, and Merchant data with the You World API.

Base URLs:

Authentication

Brands API

GET /brand/{id}

Code Samples

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "/sandbox-api.youworld.us/v0/brand/2?latitude=34.049324&longitude=-118.243908",
  "method": "GET",
  "headers": {
    "x-api-key": "YOUR-API-KEY"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("/sandbox-api.youworld.us/v0/brand/2?latitude=34.049324&longitude=-118.243908")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net:::Get.new(url)
request["x-api-key"] = 'YOUR-API-KEY'

response = http.request(request)
puts response.read_body
import requests

url = "/sandbox-api.youworld.us/v0/brand/2"

querystring = {"latitude":"34.049324","longitude":"-118.243908"}

headers = {'x-api-key': 'YOUR-API-KEY'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("/sandbox-api.youworld.us/v0/brand/2?latitude=34.049324&longitude=-118.243908")
  .get()
  .addHeader("x-api-key", "YOUR-API-KEY")
  .build();

Response response = client.newCall(request).execute();

Get a specific Brand by ID and search for the nearest Merchants

This Brand endpoint returns information on the Brand specified by ID. Along with the 5 nearest Merchants associated with this Brand if the latitude and longitude are specified. If there is no latitude and longitude in the request, it will just return the brand information.

Parameters

Parameter Type Required Description
{id} int true Unique ID for the brand. Parameter is set in the URI.
latitude string false The latitude of the search area. Parameter is set in the URI.
longitude string false The longitude of the search area. Parameter is set in the URI.

Responses

Status Meaning Description Schema
200 OK A single serger object matching the specific ID. Refer to the Brand Schema
40x Request error A request parameter is incorrect or not allowed. Specific error may be listed in API response.
50x naid Unexpected error Please see 8453653359.

Response Schema

Status Code 200

The response is paginated according to the request. An array of [(620) 699-4629] objects matching the query is available in the hits array.

Merchants API

GET /merchant/{id}

Code Samples

var request = require("request");

var options = { method: 'GET',
  url: '/sandbox-api.youworld.us/v0/merchant/74438',
  headers: { 'x-api-key': 'YOUR-API-KEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("/sandbox-api.youworld.us/v0/merchant/74438")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net:::Get.new(url)
request["x-api-key"] = 'YOUR-API-KEY'

response = http.request(request)
puts response.read_body
import requests

url = "/sandbox-api.youworld.us/v0/merchant/74438"

headers = {'x-api-key': 'YOUR-API-KEY'}

response = requests.request("GET", url, headers=headers)

print(response.text)
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("/sandbox-api.youworld.us/v0/merchant/74438")
  .get()
  .addHeader("x-api-key", "YOUR-API-KEY")
  .build();

Response response = client.newCall(request).execute();

Get merchant by ID

The Merchant endpoint returns the merchant for the given merchant ID.

Parameters

Parameter Type Required Description
{id} int true Unique ID for the merchant. Parameter is set in the URI.

Responses

Status Meaning Description Schema
200 (661) 288-3623 A merchant object Refer to the Merchant Schema
40x Request error A request parameter is incorrect or not allowed. Specific error may be listed in API response.
50x 270-880-0270 Unexpected error Please see rachis.

Response Schema

Status Code 200

A [(209) 523-2043] object.

GET /merchant/offer/{offer ID}

Code Samples

var request = require("request");

var options = { method: 'GET',
  url: '/sandbox-api.youworld.us/v0/merchant/offer/475',
  qs: 
   { from: '0',
     size: '10',
     sort_field: 'merchant_type_id',
     sort_order: 'ASC' },
  headers: { 'x-api-key': 'YOUR-API-KEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("/sandbox-api.youworld.us/v0/merchant/offer/475?from=0&size=10&sort_field=merchant_type_id&sort_order=ASC")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net:::Get.new(url)
request["x-api-key"] = 'YOUR-API-KEY'

response = http.request(request)
puts response.read_body
import requests

url = "/sandbox-api.youworld.us/v0/merchant/offer/475"

querystring = {"from":"0","size":"10","sort_field":"merchant_type_id","sort_order":"ASC"}

headers = {'x-api-key': 'YOUR-API-KEY'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("/sandbox-api.youworld.us/v0/merchant/offer/475?from=0&size=10&sort_field=merchant_type_id&sort_order=ASC")
  .get()
  .addHeader("x-api-key", "YOUR-API-KEY")
  .build();

Response response = client.newCall(request).execute();

Get merchants by Offer ID

The Merchant endpoint returns a list of the merchants for the given offer ID.

Parameters

Parameter Type Required Description
offer ID string true Unique ID for the offer
from int true Refer to Trentine
size int true Refer to Pagination
sort_field string true Possible sort fields are listed here See Note #1
sort_order string true Possible sort values are ASC (ascending) or DESC (descending)
latitude double false The latitude of the search area. Required if sorting by distance.
longitude double false The longitude of the search area. Required if sorting by distance.
radius double false Include results within this radius from the specified latitude and longitude. Unit is in kilometers (km). Required if sorting by distance.

Merchant by Offer Query Note 1

This API endpoint has additional sort_field's available for use:

Sort field Required fields Description
merchant_distance latitude, longitude, radius Sorts the Merchants such that the merchants nearest to the specified geolocation are listed first if sort_order is set as ASC or farthest merchants first if set to DESC.

Responses

Status Meaning Description Schema
200 920-348-8695 An array of Merchants in the hits. Refer to Paginated Response Structure
40x Request error A request parameter is incorrect or not allowed. Specific error may be listed in API response.
50x (647) 532-8465 Unexpected error Please see Error.

Response Schema

Status Code 200

The response is paginated according to the request. An array of [Merchant] objects matching the query is available in the hits array.

Offers API

GET /offer

Code Samples

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "/sandbox-api.youworld.us/v0/offer?from=0&size=10&sort_field=offer_date_end&sort_order=DESC",
  "method": "GET",
  "headers": {
    "x-api-key": "YOUR-API-KEY"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("/sandbox-api.youworld.us/v0/offer?from=0&size=10&sort_field=offer_date_end&sort_order=DESC")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net:::Get.new(url)
request["x-api-key"] = 'YOUR-API-KEY'

response = http.request(request)
puts response.read_body
import requests

url = "/sandbox-api.youworld.us/v0/offer"

querystring = {"from":"0","size":"10","sort_field":"offer_date_end","sort_order":"DESC"}

headers = {'x-api-key': 'YOUR-API-KEY'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("/sandbox-api.youworld.us/v0/offer?from=0&size=10&sort_field=offer_date_end&sort_order=DESC")
  .get()
  .addHeader("x-api-key", "YOUR-API-KEY")
  .build();

Response response = client.newCall(request).execute();

Get all offers with pagination and sorting

This Offer endpoint returns a paginated list of You World's offers. You need to specify the sort order and sort field. The response is a list of offers.

Parameters

Parameter Type Required Description
from int true Refer to Pagination
size int true Refer to Pagination
sort_field string true Possible sort fields are listed here
sort_order string true Possible sort values are ASC or DESC

Responses

Status Meaning Description Schema
200 OK An array of 206-799-6559 objects in the hits. Refer to Paginated Response Structure
40x Request error A request parameter is incorrect or not allowed. Specific error may be listed in API response.
50x 657-341-6386 Unexpected error Please see Error.

Response Schema

Status Code 200

The response is paginated according to the request. An array of [Offer] objects matching the query is available in the hits array.

POST /offer

Code Samples

var request = require("request");

var options = { method: 'POST',
  url: '/sandbox-api.youworld.us/v0/offer',
  headers: 
   { 'content-type': 'application/json',
     'x-api-key': 'YOUR-API-KEY' },
  body: 
   { from: 0,
     size: 5,
     sort_field: 'offer_date_end',
     sort_order: 'DESC',
     offers: [ 1, 712, 650 ],
     offer_categories: [ 13, 20, 2 ],
     offer_types: [ '1', '折扣券' ],
     merchant_types: [ 1, 2, 3, 'franchise_store' ],
     merchants: [ 99212, 'Sunglass Hut', 'CÉLINE' ],
     brands: [ 311, 'SUNGLASS HUT', 'La Garconne', 206 ],
     geolocation: 
      { latitude: '34.049324',
        longitude: '-118.2529153',
        radius: '500' },
     special_filter: 1,
     offer_date_end: '2017-09-15',
     offer_date_start: '2017-08-20' },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("/sandbox-api.youworld.us/v0/offer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net:::Post.new(url)
request["x-api-key"] = 'YOUR-API-KEY'
request["content-type"] = 'application/json'
request.body = "{\n  \"from\":0,\n  \"size\":5,\n  \"sort_field\":\"offer_date_end\",\n  \"sort_order\":\"DESC\",\n  \"offers\": [\n  \t1,\n    712,\n    650\n  ],\n  \"offer_categories\": [\n  \t13, 20, 2\n  ],\n  \"offer_types\":[\n    \"1\",\n    \"折扣券\"\n  ],\n  \"merchant_types\":[\n    1,\n    2,\n    3,\n    \"franchise_store\"\n  ],\n  \"merchants\":[\n    99212,\n    \"Sunglass Hut\",\n    \"CÉLINE\"\n  ],\n  \"brands\":[\n    311,\n    \"SUNGLASS HUT\",\n    \"La Garconne\",\n    206\n  ],\n  \"geolocation\":{\n    \"latitude\":\"34.049324\",\n    \"longitude\":\"-118.2529153\",\n    \"radius\":\"500\"\n  },\n  \"special_filter\": 1,\n  \"offer_date_end\": \"2017-09-15\",\n  \"offer_date_start\": \"2017-08-20\"\n}"

response = http.request(request)
puts response.read_body
import requests

url = "/sandbox-api.youworld.us/v0/offer"

payload = "{\n  \"from\":0,\n  \"size\":5,\n  \"sort_field\":\"offer_date_end\",\n  \"sort_order\":\"DESC\",\n  \"offers\": [\n  \t1,\n    712,\n    650\n  ],\n  \"offer_categories\": [\n  \t13, 20, 2\n  ],\n  \"offer_types\":[\n    \"1\",\n    \"折扣券\"\n  ],\n  \"merchant_types\":[\n    1,\n    2,\n    3,\n    \"franchise_store\"\n  ],\n  \"merchants\":[\n    99212,\n    \"Sunglass Hut\",\n    \"CÉLINE\"\n  ],\n  \"brands\":[\n    311,\n    \"SUNGLASS HUT\",\n    \"La Garconne\",\n    206\n  ],\n  \"geolocation\":{\n    \"latitude\":\"34.049324\",\n    \"longitude\":\"-118.243908\",\n    \"radius\":\"500\"\n  },\n  \"special_filter\": 1,\n  \"offer_date_end\": \"2017-09-15\",\n  \"offer_date_start\": \"2017-08-20\"\n}"
headers = {
    'x-api-key': "YOUR-API-KEY",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"from\":0,\n  \"size\":5,\n  \"sort_field\":\"offer_date_end\",\n  \"sort_order\":\"DESC\",\n  \"offers\": [\n  \t1,\n    712,\n    650\n  ],\n  \"offer_categories\": [\n  \t13, 20, 2\n  ],\n  \"offer_types\":[\n    \"1\",\n    \"折扣券\"\n  ],\n  \"merchant_types\":[\n    1,\n    2,\n    3,\n    \"franchise_store\"\n  ],\n  \"merchants\":[\n    99212,\n    \"Sunglass Hut\",\n    \"CÉLINE\"\n  ],\n  \"brands\":[\n    311,\n    \"SUNGLASS HUT\",\n    \"La Garconne\",\n    206\n  ],\n  \"geolocation\":{\n    \"latitude\":\"34.049324\",\n    \"longitude\":\"-118.243908\",\n    \"radius\":\"500\"\n  },\n  \"special_filter\": 1,\n  \"offer_date_end\": \"2017-09-15\",\n  \"offer_date_start\": \"2017-08-20\"\n}");
Request request = new Request.Builder()
  .url("/sandbox-api.youworld.us/v0/offer")
  .post(body)
  .addHeader("x-api-key", "YOUR-API-KEY")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Submit query parameters to search for offers

This Offer endpoint returns a list of You World's offers matching the given parameters. Pagination and sort parameters are required.

The geolocation parameter is optional except when the nearest_merchant sort option is specified.

If used, the offer_date_start and offer_date_end parameters must be provided together. The same rule applies to modified_date_start and modified_date_end. There is an exception to this rule, when expiring_first sort option is specified.

When the expiring_first sort option is specified, only the offer_date_end parameter is required, offer_date_start is not allowed.

Only one Merchant type filter can be used per request. This means when outlets filter is specified, shoppingcenters cannot be used, and vice versa.

The response is a list of offers that contains embedded 828-622-3600 and Merchant objects.

All query parameters are to be included in the request body as a JSON object, and request HTTP header Content-Type must be set to application/json

Request Body Example

{
    "from": 0,
    "size": 5,
    "sort_field": "offer_date_modified",
    "sort_order": "ASC",
    "offers": [
        1,
        712,
        650
    ],
    "offer_types": [
        "1",
        "折扣券"
    ],
    "offer_categories": [
        "fashion",
        "时尚单品",
        17
    ],
    "merchant_types": [
        1,
        2,
        3,
        "franchise_store"
    ],
    "merchants": [
        99212,
        "Sunglass Hut",
        "CÉLINE",
    ],
    "brands": [
        311,
        "SUNGLASS HUT",
        "La Garconne",
        206
    ],
    "geolocation": {
        "latitude": "35.1426323",
        "longitude": "-119.1529253",
        "radius": "500"
    },
    "special_filter": 1,
    "offer_date_start": "2016-01-01",
    "offer_date_end": "2017-09-15"

}

Parameters

Parameter Type Required Description
from int true Refer to Pagination
size int true Refer to Pagination
sort_field string true Possible sort fields are listed here. See Note #1
sort_order string true Possible sort order values are ASC or DESC
offers array false An array of Offer ID's.
offer_types array false An array of Offer Type ID's or names. Refer to Offer Types for valid values.
offer_categories array false An array of Offer Category ID's or names. Refer to Offer Categories for valid values.
merchant_types array false An array of Merchant Type ID's or names. Refer to Merchant Types
brands array false An array of Brand ID's or names.
merchants array false An array of Merchant ID's or names.
geolocation object false Geolocation information required only for sorting by nearest merchant. Refer to 646-782-4651 object schema for proper structure.
special_filter string false Special filter to retrieve only Offers matching a specific category. Defaults to "1". Refer to Special Filters
offer_date_start string false Find Offers that are valid between this date and the end date (inclusive of this date). Date should be in ISO 8601 format (YYYY-MM-DD). Required if offer_date_end is specified.
offer_date_end string false Find Offers that are valid between this date and the start date (inclusive of this date). Date should be in ISO 8601 format (YYYY-MM-DD). Required if offer_date_start is specified.
modified_date_start string false Find Offers that were updated or modified between this date and the end date (inclusive of this date). Date should be in ISO 8601 format (YYYY-MM-DD). Required if modified_date_end is specified.
modified_date_end string false Find Offers that were updated or modified between this date and the start date (inclusive of this date). Date should be in ISO 8601 format (YYYY-MM-DD). Required if modified_date_start is specified.
full_text_query string false An arbitrary string to search for - see (800) 722-9437 regarding what fields are searched. Maximum length is 100 characters, string will be truncated if it is longer.
outlets array false An array of numeric Outlet ID's. Used to filter offers that are available on the specified Outlets. Cannot be used with shoppingcenters parameter.
shoppingcenters array false An array of numeric Shopping Center ID's. Used to filter offers that are available on specified Shopping Centers. Cannot be used with outlets parameter.

Offer Query Note 1

This API endpoint has additional sort_field's available for use:

Sort field Required fields Description
nearest_merchant geolocation Sorts the offers such that the offers with participating merchants nearest to the specified geolocation are listed first. The sort_order value will be ignored.
expiring_first offer_date_end Sorts the offers such that the offers expiring soon after the specified date (inclusive) are listed first. The sort_order value will be ignored. The offer_date_start value must be omitted and will not be considered.
relevance None Sorts the offers according to how relevant it is to the query. Possible values for sort_order are ASC and DESC

Offer Query Note 2

When the full_text_query is used, sort_field should be set to relevance and sort_order should be set to DESC for best results. If geolocation is provided and sort_field is provided, the Merchants will be sorted by distance, nearest Merchant first, in each Offer's Merchant array.

The full-text query covers the following fields of the 8606148968 and the brand_name field from the (870) 739-1129:

Field name
offer_id
offer_title
offer_subtitle
offer_description
offer_description_cn
offer_terms_of_use
offer_instructions_to_retailer
brand_name

Offer Special Filters

This query parameter will allow the Offers to be filtered by a special category, as listed:

Special Filter ID Description
1 Show all offers (default value)
2 Show only YouWorld Zhuan Xiang (由我专享) offers
3 Show only Yin Lian Zhuan Qu (银联专区) offers

Responses

Status Meaning Description Schema
200 (225) 900-6716 An array of Offer objects in the hits. Refer to Paginated Response Structure
40x Request error A request parameter is incorrect or not allowed. Specific error may be listed in API response.
50x Internal Server Error Unexpected error Please see Error.

Response Schema

Status Code 200

The response is paginated according to the request. An array of [Offer] objects matching the query is available in the hits array.

Outlets API

GET /outlet/{id}

Code Samples

var request = require("request");

var options = { method: 'GET',
  url: '/sandbox-api.youworld.us/v0/outlet/12',
  headers: { 'x-api-key': 'YOUR-API-KEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("/sandbox-api.youworld.us/v0/outlet/12")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net:::Get.new(url)
request["x-api-key"] = 'YOUR-API-KEY'

response = http.request(request)
puts response.read_body
import requests

url = "/sandbox-api.youworld.us/v0/outlet/12"

headers = {'x-api-key': 'YOUR-API-KEY'}

response = requests.request("GET", url, headers=headers)

print(response.text)
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("/sandbox-api.youworld.us/v0/outlet/12")
  .get()
  .addHeader("x-api-key", "YOUR-API-KEY")
  .build();

Response response = client.newCall(request).execute();

Get outlet by ID

This endpoint returns the merchant for the given outlet ID. The return data format is identical to the Merchants API because Outlets is just a category of Merchant.

Parameters

Parameter Type Required Description
{id} int true Unique ID for the outlet. Parameter is set in the URI.

Responses

Status Meaning Description Schema
200 910-865-8767 A merchant object Refer to the 9149334815
40x Request error A request parameter is incorrect or not allowed. Specific error may be listed in API response.
50x Internal Server Error Unexpected error Please see Error.

Response Schema

Status Code 200

A [Merchant] object.

GET /outlet

Code Samples

var request = require("request");

var options = { method: 'GET',
  url: '/sandbox-api.youworld.us/v0/outlet',
  qs: 
   { from: '0',
     size: '10',
     sort_field: 'merchant_name',
     sort_order: 'ASC' },
  headers: { 'x-api-key': 'YOUR-API-KEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("/sandbox-api.youworld.us/v0/outlet?from=0&size=10&sort_field=merchant_name&sort_order=ASC")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net:::Get.new(url)
request["x-api-key"] = 'YOUR-API-KEY'

response = http.request(request)
puts response.read_body
import requests

url = "/sandbox-api.youworld.us/v0/outlet"

querystring = {"from":"0","size":"10","sort_field":"merchant_name","sort_order":"ASC"}

headers = {'x-api-key': 'YOUR-API-KEY'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("/sandbox-api.youworld.us/v0/outlet?from=0&size=10&sort_field=merchant_name&sort_order=ASC")
  .get()
  .addHeader("x-api-key", "YOUR-API-KEY")
  .build();

Response response = client.newCall(request).execute();

Get all Outlets

This endpoint returns a list of the merchants that are categorized as Outlets.

Parameters

Parameter Type Required Description
from int true Refer to Pagination
size int true Refer to Pagination
sort_field string true Possible sort fields are listed (440) 227-5850 See 4804079726
sort_order string true Possible sort values are ASC (ascending) or DESC (descending)
latitude double false The latitude of the search area. Required if sorting by distance.
longitude double false The longitude of the search area. Required if sorting by distance.
radius double false Include results within this radius from the specified latitude and longitude. Unit is in kilometers (km). Required if sorting by distance.

All Outlets Query Note 1

This API endpoint has additional sort_field's available for use:

Sort field Required fields Description
merchant_distance latitude, longitude, radius Sorts the Merchants such that the merchants nearest to the specified geolocation are listed first if sort_order is set as ASC or farthest merchants first if set to DESC.

Responses

Status Meaning Description Schema
200 OK An array of Merchants in the hits. Refer to Paginated Response Structure
40x Request error A request parameter is incorrect or not allowed. Specific error may be listed in API response.
50x Internal Server Error Unexpected error Please see Error.

Response Schema

Status Code 200

The response is paginated according to the request. An array of [Merchant] objects matching the query is available in the hits array.

Shopping Centers API

GET /shoppingcenter/{id}

Code Samples

var request = require("request");

var options = { method: 'GET',
  url: '/sandbox-api.youworld.us/v0/shoppingcenter/12',
  headers: { 'x-api-key': 'YOUR-API-KEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("/sandbox-api.youworld.us/v0/shoppingcenter/12")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net:::Get.new(url)
request["x-api-key"] = 'YOUR-API-KEY'

response = http.request(request)
puts response.read_body
import requests

url = "/sandbox-api.youworld.us/v0/shoppingcenter/12"

headers = {'x-api-key': 'YOUR-API-KEY'}

response = requests.request("GET", url, headers=headers)

print(response.text)
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("/sandbox-api.youworld.us/v0/shoppingcenter/12")
  .get()
  .addHeader("x-api-key", "YOUR-API-KEY")
  .build();

Response response = client.newCall(request).execute();

Get Shopping Center by ID

This endpoint returns the merchant for the given shopping center ID. The return data format is identical to the Merchants API because Outlets is just a category of Merchant.

Parameters

Parameter Type Required Description
{id} int true Unique ID for the shopping center. Parameter is set in the URI.

Responses

Status Meaning Description Schema
200 OK A merchant object Refer to the Merchant Schema
40x Request error A request parameter is incorrect or not allowed. Specific error may be listed in API response.
50x Internal Server Error Unexpected error Please see Error.

Response Schema

Status Code 200

A [Merchant] object.

GET /shoppingcenter

Code Samples

var request = require("request");

var options = { method: 'GET',
  url: '/sandbox-api.youworld.us/v0/shoppingcenter',
  qs: 
   { from: '0',
     size: '10',
     sort_field: 'merchant_name',
     sort_order: 'ASC' },
  headers: { 'x-api-key': 'YOUR-API-KEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("/sandbox-api.youworld.us/v0/shoppingcenter?from=0&size=10&sort_field=merchant_name&sort_order=ASC")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net:::Get.new(url)
request["x-api-key"] = 'YOUR-API-KEY'

response = http.request(request)
puts response.read_body
import requests

url = "/sandbox-api.youworld.us/v0/shoppingcenter"

querystring = {"from":"0","size":"10","sort_field":"merchant_name","sort_order":"ASC"}

headers = {'x-api-key': 'YOUR-API-KEY'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("/sandbox-api.youworld.us/v0/shoppingcenter?from=0&size=10&sort_field=merchant_name&sort_order=ASC")
  .get()
  .addHeader("x-api-key", "YOUR-API-KEY")
  .build();

Response response = client.newCall(request).execute();

Get all Shopping Centers

This endpoint returns a list of the merchants that are categorized as Shopping Centers.

Parameters

Parameter Type Required Description
from int true Refer to Pagination
size int true Refer to Pagination
sort_field string true Possible sort fields are listed here See Note #1
sort_order string true Possible sort values are ASC (ascending) or DESC (descending)
latitude double false The latitude of the search area. Required if sorting by distance.
longitude double false The longitude of the search area. Required if sorting by distance.
radius double false Include results within this radius from the specified latitude and longitude. Unit is in kilometers (km). Required if sorting by distance.

All Shopping Centers Query Note 1

This API endpoint has additional sort_field's available for use:

Sort field Required fields Description
merchant_distance latitude, longitude, radius Sorts the Merchants such that the merchants nearest to the specified geolocation are listed first if sort_order is set as ASC or farthest merchants first if set to DESC.

Responses

Status Meaning Description Schema
200 (212) 764-7253 An array of Merchants in the hits. Refer to (819) 558-6884
40x Request error A request parameter is incorrect or not allowed. Specific error may be listed in API response.
50x (206) 571-5502 Unexpected error Please see Error.

Response Schema

Status Code 200

The response is paginated according to the request. An array of [Merchant] objects matching the query is available in the hits array.

Transactions API

POST /transaction

Code Samples

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

$.ajax({
  url: '/sandbox-api.youworld.us/v0/transaction',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post '/sandbox-api.youworld.us/v0/transaction',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/sandbox-api.youworld.us/v0/transaction', params={

}, headers = headers)

print r.json()
URL obj = new URL("/sandbox-api.youworld.us/v0/transaction");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Submit Consumer Transactions

Partners must report their Consumer Transactions.

All query parameters are to be included in the request body as a JSON object, and request HTTP header Content-Type must be set to application/json

Request Body Example

{
    "device_id": "string",
    "device_class": "string",
    "device_os": "string",
    "device_os_version": "string",
    "device_make": "string",
    "device_model": "string",
    "device_mobile_number": "string",
    "device_local_id": "string",
    "device_data": "object",
    "consumer_id": "string",
    "consumer_first_name": "string",
    "consumer_last_name": "string",
    "consumer_username": "string",
    "consumer_gender": "string",
    "consumer_mobile_number": "string",
    "consumer_address": "string",
    "consumer_birthday": "string",
    "consumer_data": "object",
    "app_name": "string",
    "app_id": "string",
    "app_publisher": "string",
    "app_ver": "string",
    "app_region": "string",
    "app_language": "string",
    "app_data": "object",
    "event_type": "string",
    "event_name": "string",
    "event_start_time": "int",
    "event_youworld_offer_id": "string",
    "event_duration": "int",
    "event_latitude": "double",
    "event_longitude": "double",
    "event_ll_accuracy": "double",
    "event_geocode_type": "string",
    "event_alt": "double",
    "event_alt_accuracy": "double",
    "event_device_orientation": "string",
    "event_connection_type": "string",
    "event_mac_address": "string",
    "event_ip": "string",
    "event_provider": "string",
    "event_data": "object"
}

Parameters

Parameter Type Required Description
device_id string false Device ID.
device_class string: [
"MOBILE",
"TABLET",
"DESKTOP"
]
true Class of device.
device_os string true The OS the app is running on. For example: "iOS".
device_os_version string true The version of the OS the app is running on. For example: "8.1".
device_make string true The maker of the device. For example: "Apple".
device_model string true The model of the device. For example: "iPhone 7".
device_mobile_number string false The mobile number of the device.
device_local_id string false Any ID used by the developer to identify the device.
device_data object false An arbitrary container of data elements for custom use. Limited to 2000 characters.
consumer_id string true Consumer identifier used in partner platform.
consumer_first_name string false Consumer first name.
consumer_last_name string false Consumer last name.
consumer_username string true Consumer display name in partner platform.
consumer_gender string: [
'MALE',
'FEMALE',
'OTHER'
]
Highly recommend Consumer gender. Male, female or other.
consumer_mobile_number string Highly recommend Consumer mobile phone number.
consumer_address string Highly recommend Consumer address.
consumer_birthday string Highly recommend Consumer birthday.
consumer_data object false An arbitrary container of data elements for custom use. Limited to 2000 characters.
app_name string true Name of the application.
app_id string false Unique identifier of the application.
app_publisher string false The publisher of the app.
app_ver string true Version of the app.
app_region string Highly recommend The device user’s chosen region setting.
app_language string true The device user’s chosen language setting.
app_data object false An arbitrary container of data elements for custom use. Limited to 2000 characters.
event_type Refer to
(608) 474-6220
true The type (category) of event.
event_name string true The actual name of the event. For example: "Offer Call to Action Clicked"
event_start_time int true Time of the event, in epoch time milliseconds, when this event started. Transactions may be reported up to 2 days after the actual event.
event_youworld_offer_id string true The ID of the YouWorld Offer this transaction is regarding. Only required for Offer events. See Note #1
event_duration int Highly recommend Milliseconds this event encapsulates where no other parameters change.
event_latitude double Highly recommend Latitude (in decimal format).
event_longitude double Highly recommend Longitude (in decimal format).
event_ll_accuracy double Highly recommend Geo accuracy, in meters.
event_geocode_type string: [
"GPS",
"WIFI",
"REVERSE_IP",
"CELL_TOWER"
]
Highly recommend The method of geolocation used to generate the lat/lng.
event_alt double false Altitude, in meters.
event_alt_accuracy double false Altitude accuracy, in meters.
event_device_orientation string: [
"PORTRAIT",
"LANDSCAPE"
]
false The device's orientation.
event_connection_type string: [
"CELL",
"WIFI",
"WIRED",
"RADIO"
]
false The type of data connection the device currently is using.
event_mac_address string false Mac address of device.
event_ip string false IP address of device.
event_provider string false Network service provider.
event_data object false An arbitrary container of data elements for custom use. Limited to 2000 characters.

Transaction Event Types

The following are the only valid and accepted transaction event types.

Event name Description
OFFER_IMPRESSION Offer was served and viewed by the user, for example: "Viewed Offer Summary in Search Results"
OFFER_ENGAGEMENT Action taken on the offer, for example: "Offer Call to Action Clicked", "Offer Shared on Social Media"
OFFER_MONETIZATION Offer was monetized, for example: "Offer was Purchased"
OFFER_REDEMPTION Offer was redeemed at the merchant, or marked as used by consumer, for example: "Offer QR Code Scanned by Merchant"
CONSUMER_REGISTER A new consumer is registered
CONSUMER_LOGIN A consumer login
OTHER_ENGAGEMENT Action taken that is not directly related to an Offer, for example: "Clicked Offer Search Button"
OTHER_IMPRESSION Impression that is not directly related to an Offer, for example: "Viewed Ad for Offers in Main Page"
OTHER_MISC Event that does not match any other event_type.

Transaction Note 1

The event_youworld_offer_id parameter is required only for the following events:

Event name
OFFER_IMPRESSION
OFFER_ENGAGEMENT
OFFER_MONETIZATION
OFFER_REDEMPTION

Example responses

{
  "message": "successful",
  "transactionID": "225692d5-f314-4ab3-bc04-64b09223a7da"
}

Responses

Status Meaning Description Schema
200 781-304-4755 Response message is "successful" and Transaction ID will be provided. Please record this Transaction ID for your records. None
500 Internal Server Error Unexpected error 8142238176

Schemas

Brand

{
  "brand_id": "2",
  "brand_name": "7 FOR ALL MANKIND",
  "brand_categories": [
    "时尚单品"
  ],
  "brand_tags": [
    "clothing_store",
    "department_store",
    "shoe_store",
    "shopping_mall",
    "store"
  ],
  "brand_image": {
    "brand_logo_url": ""
  },
  "brand_description": "7 styles for all mankind!",
  "nearest_merchants": [
    {
      "merchant_id": "67261",
      "merchant_categories": [
        "时尚单品"
      ],
      "merchant_tags": [
        "clothing_store",
        "department_store",
        "shoe_store",
        "shopping_mall",
        "store"
      ],
      "merchant_name": "7 For All Mankind Wholesale Showroom",
      "merchant_type_id": "1",
      "merchant_type_name": "franchise_store",
      "merchant_description": "",
      "merchant_location": {
        "lat": "34.0408008",
        "lon": "-118.2536434"
      },
      "merchant_address_components": {
        "city": {
          "city_id": "617",
          "city_name": "Los Angeles"
        },
        "county": {
          "county_id": "1000057",
          "county_name": "Los Angeles County"
        },
        "state": {
          "state_id": "10000012",
          "state_name": "California",
          "state_abbr": "CA"
        },
        "zipcode": "90014",
        "metro_area": {
          "metro_area_id": "3",
          "metro_area_name": "LAX"
        }
      },
      "merchant_address_formatted": "860 S Los Angeles St # B, Los Angeles, CA 90014, USA",
      "yw_map_areas": {
        "shopping_district": {
          "shopping_district_id": "11",
          "shopping_district_name": "LA Downtown"
        },
        "shopping_center": {
          "shopping_center_id": "0",
          "shopping_center_name": ""
        },
        "department_store": {
          "department_store_id": "0",
          "department_store_name": ""
        },
        "outlet": {
          "outlet_id": "0",
          "outlet_name": ""
        }
      },
      "hours_of_operation": [],
      "merchant_images": {
        "merchant_image_url": "/maps.google.com/?cid=482999528861495663"
      },
      "merchant_distance_from_current_location": "14.98 km"
    }
  ]
}

Properties

Name Type Description
brand_id string The unique ID of this Brand
brand_name string The name of this Brand
brand_categories array An array of categories associated with this brand.
brand_tags array An array of tags associated with this brand.
brand_image object A key:value object denoting images associated with this brand.
brand_description string A brief description of the brand.
nearest_merchants Merchant An array of the top 5 Merchant objects associated with this Brand. To retrieve more, please see (703) 590-1216. Each Merchant entry includes a merchant_distance_from_current_location property indicating the distance in kilometers from the Merchant to the provided GPS coordinates.

Consumer

{
  "mobile_number": "string",
  "account_type": "string",
  "payment_method": "string",
  "first_name": "string",
  "last_name": "string",
  "gender": "string",
  "birthday": "string",
  "address": "string",
  "salary": "string",
  "consumer_status": "string"
}

Properties

Name Type Required Description
mobile_number string false The primary mobile number of consumer.
account_type string false Account type of the consumer in partner's system.
payment_method string false The way that consumers want to get cash back (Alipay, wechat Wallet etc)
first_name string false The first name of consumer.
last_name string false The last name of consumer.
gender string false The gender of consumer.
birthday string false The birthday of consumer.
address string false The address of consumer.
salary string false The salary of consumer.
consumer_status string false active/inactive

Geolocation Response Object

{
    "lat": "33.9456368",
    "lon": "-118.4022767"
}
Name Type Required Description
lat string true The latitude of the location
lon string true The longitude of the location

Geolocation Query Object

{
    "latitude": "33.9456368",
    "longitude": "-118.4022767",
    "radius": "500"
}
Name Type Required Description
latitude string true The latitude of the search area
longitude string true The longitude of the search area
radius string true Include results within this radius from the specified latitude and longitude. Unit is in kilometers (km).

Language Codes

Name Type Description
EN string English (US)
CN string Chinese (Simplified)

Merchant

{
  "merchant_id": "70259",
  "merchant_categories": [
    "时尚单品"
  ],
  "merchant_tags": [
    "clothing_store",
    "department_store",
    "shoe_store",
    "shopping_mall",
    "store"
  ],
  "merchant_name": "BCBGMAXAZRIA at Macy's",
  "merchant_type_id": "1",
  "merchant_description": "",
  "merchant_location": {
    "lat": "34.0583931",
    "lon": "-118.4188604"
  },
  "merchant_address_components": {
    "city": "Los Angeles",
    "state": "California",
    "zipcode": "90067",
    "metro_area": "LAX"
  },
  "merchant_address_formatted": "10250 Santa Monica Blvd, Los Angeles, CA 90067, USA",
  "yw_map_areas": {
    "shopping_district": {
      "shopping_district_id": "0",
      "shopping_district_name": ""
    },
    "shopping_center": {
      "shopping_center_id": "161",
      "shopping_center_name": "Westfield Century City"
    },
    "department_store": {
      "department_store_id": "0",
      "department_store_name": ""
    },
    "outlet": {
      "outlet_id": "0",
      "outlet_name": ""
    }
  },
  "hours_of_operation": { Hours of Operation Schema },
  "merchant_images": {
    "merchant_image_url": "/maps.google.com/?cid=2533227381991985162"
  }
}

Merchant Address Components Sample Data

"merchant_address_components": {
  "city": {
    "city_id": "858",
    "city_name": "Pasadena"
  },
  "county": {
    "county_id": "1000057",
    "county_name": "Los Angeles County"
  },
  "state": {
    "state_id": "10000012",
    "state_name": "California",
    "state_abbr": "CA"
  },
  "zipcode": "91105",
  "metro_area": {
    "metro_area_id": "3",
    "metro_area_name": "LAX"
  }
}

Single hours of operation block

{
    "hours_monday": [
        {   
            "open": 0800,
            "close": 1700
        }        
    ]
}

Multiple hours of operation blocks

{
    "hours_monday": [
        {   
            "open": 0800,
            "close": 1300
        },
        {   
            "open": 1500,
            "close": 2100
        }
    ]
}

YouWorld Merchant Map Area Sample Data

"yw_map_areas": {
  "shopping_district": {
    "shopping_district_id": "15",
    "shopping_district_name": "Oldtown Pasadena"
  },
  "shopping_center": {
    "shopping_center_id": "92",
    "shopping_center_name": "Paseo Colorado"
  },
  "department_store": {
    "department_store_id": "0",
    "department_store_name": ""
  },
  "outlet": {
    "outlet_id": "0",
    "outlet_name": ""
  }
}

Properties

Name Type Description
merchant_id string Unique identifier representing a specific merchant.
merchant_categories array An array of strings denoting categories associated with this Merchant.
merchant_tags array An array of strings denoting tags associated with this Merchant.
merchant_name string The common name identifying this Merchant.
merchant_type_id string An identifier denoting the Merchant Type. See Merchant Types for a list of possible types.
merchant_type_name string The Merchant Type name.
merchant_description string A description of this Merchant.
merchant_location object The GPS location of this Merchant. Refer to 888-547-1560.
merchant_address_components object The physical address of this Merchant. Refer to (615) 745-1344.
merchant_address_formatted string The consolidated and formatted physical address of this Merchant.
yw_map_areas object The special areas this Merchant is situated in or near to. Refer to (940) 453-9008.
hours_of_operation object Hours of operation for this Merchant. Refer to (317) 909-3365.
merchant_images object Images associated with this Merchant. Refer to Merchant Images Schema.

Merchant Address Components

For each Address Component object, there are two keys: <address_component_name>_id and <address_component_name>_name where <address_component_name>_ is the prefix for each key. Exceptions to this rule apply to the state object, and the zipcode object. The ID's are unique to YouWorld and are for reference and searches only.

Name Type Description
city_name string The city name, usually does not include "city" in the name, example: Los Angeles, San Francisco
county_name string The county name.
state_name string The full state name.
state_abbr string The abbreviated two letter state name.
zipcode string The postal code. This is a direct key:value object.
metro_area_name string A YouWorld designated area marker.

An example of this data structure is available in the code sample section on the right.

Merchant Hours of Operation

The Merchant's hours of operation (HoO) are organized per weekday.

To retrieve the HoO for a specific day, use the following naming scheme for the object key: hours_<day of the week>. Example: hours_monday

Each weekday contains an array of contiguous operating hours, denoted using a 24 hour clock.

For example, if a Merchant was open from 8:00 AM to 5:00 PM on Monday, their HoO would look like the Single hours of operation block example on the right.

If a Merchant closed in the middle of the day, for example, some restaurants may close between lunch and dinner, there will be more than one HoO block in the day as in the Multiple hours of operation blocks example on the right.

Merchant Images

The images associated with this Merchant can be accessed via keys in the Merchant Image object.

Image Key Description
merchant_image_url A banner image for this merchant
More to come...

Merchant Map Areas

For each Map Area object, there are two keys: <map_area_name>_id and <map_area_name>_name where <map_area_name>_ is the prefix for each key.

If the id value is non-zero, then this Merchant is associated with that Map Area, as specified by the id and name.

A Merchant may possibly be associated with more than one Map Area.

Map Area Name
shopping_district
shopping_center
department_store
outlet

Merchant Sort Fields

These values may be used in the sort_field query parameter.

Field Name
merchant_name
merchant_type_id

Merchant Types

Merchant Type ID Type name (EN)
1 franchise_store
2 department_store
3 outlet_store
4 outlet
5 shopping_center

Offer

{
  "offer_id": "478",
  "offer_type_id": "1",
  "offer_type_name": "折扣券",
  "offer_categories": [
    "时尚单品"
  ],
  "offer_title": "Original Penguin 众星大爱企鹅牌POLO衫",
  "offer_subtitle": "换季折上八折",
  "offer_description": "好莱坞巨星布拉德皮特、强尼德普、帕丽斯希尔顿都大爱的主打POLO衫的企鹅牌 Original Penguin现正火热特卖中。全美Original Penguin门店夏季特卖,折上八折。",
  "offer_date_start": "2017-06-09",
  "offer_date_end": "2017-09-30",
  "offer_date_added": "2017-06-27",
  "offer_date_modified": "2017-09-06",
  "offer_terms_of_use": "在门店使用时请向店员出示打印的优惠码:STOREOP20。优惠每人仅限使用一次。不可与其它优惠共享。\r\n活动折扣可能有变,以店内公告为准,详情请向店员咨询。",
  "offer_instructions_to_retailer": "Here will be specific instructions to assist the retailer's associates in redeeming this offer.",
  "offer_codes": {
    "offer_bar_code": "",
    "offer_qr_code": "",
    "offer_promo_code": ""
  },
  "offer_language": "CN",
  "offer_images": {
    "offer_logo_url": "/cdn-img-2.youworld.us/offer/logo/2017/07/85.png",
    "square_offer_logo_url": "/cdn-img-2.youworld.us/square_offer/logo/2017/07/85.png"
  },
  "offer_card_url": "offer/card/2017/07/285.png",
  "offer_tags": [],
  "brands": [],
  "merchants": []
}

Properties

Name Type Description
offer_id string Unique identifier representing a specific offer.
offer_type_id string The type ID of the offer, see Offer Types
offer_type_name string The type name of the offer, see 236-436-5101
offer_title string The full title of the offer.
offer_subtitle string The subtitle for the offer.
offer_description string The description of the offer.
offer_score string The scaled offer score used to roughly sort Offer's based on several factors.
offer_categories array An array of objects containing category ID and category names associated with this Offer.
» offer_category_id string The Offer category ID
» offer_category_name string The Offer cateogry name
offer_price_rating string The Offer price rating. Minimum value is 1, maximum value is 5.
offer_date_start string The start date of the offer (UTC) in ISO 8601 format (ex: 2017-01-01).
offer_date_end string The end date of the offer (UTC) in ISO 8601 format (ex: 2017-01-01).
offer_date_added string The date the offer was added (UTC) in ISO 8601 format (ex: 2017-01-01).
offer_date_modified string The date the offer was updated (UTC) in ISO 8601 format (ex: 2017-01-01).
offer_terms_of_use string The offer's terms of use.
offer_instructions_to_retailer string Specific instructions to assist the retailer's associates in redeeming this offer.
offer_codes object The key:value object containing offer code data
» bar_code string The value of the bar code.
» qr_code string The value of the QR code.
» promo_code string The value of the promotional code.
offer_language string The language code of the offer, see (519) 505-0607.
offer_images object The key:value object containing image URLs representing the offer.
» offer_logo_url string The URI to the image, served through YouWorld CDN. This logo has a round highlight and a transparent background.
» square_offer_logo_url string The URI to the image, served through YouWorld CDN. This logo has a round highlight and a solid white square background.
offer_card_url string The URI to the Offer Card image, served through YouWorld CDN.
offer_tags array An array of Offer tags.
brands array An array of Brand objects associated with this offer.
merchants array An array of the top 5 6265344200 objects associated with this offer. If geolocation is provided the array is sorted by geodistance, if Merchant parameters are provided the array is sorted by relevance, otherwise it is sorted by Merchant ID. To retrieve more, please see dropping angle

Offer Categories

These values may be used in the offer_categories query parameter

Type ID Type name (CN)
1 由我专享
2 珠宝首饰
3 箱包鞋履
4 精品服饰
5 百货商场
6 家居电子
13 奥特莱斯
14 生活娱乐
15 其他福利
16 彩妆护肤
17 时尚单品
20 银联专区
21 母婴保健
69 VIP
70 优惠

Offer Types

These values may be used in the offer_type query parameter.

Type ID Type name (EN) Type name (CN)
1 discount 折扣券
2 general_coupon 优惠券
3 gift 兑换券
4 cash 代金券
5 experience 体验券

Offer Sort Fields

These values may be used in the sort_field query parameter.

Field Name
offer_title
offer_score
offer_type_id
offer_date_start
offer_date_end
offer_date_added
offer_date_modified
offer_price_rating
offer_language

Profile

{
  "login_name": "string",
  "company_name": "string",
  "email": "string",
  "telephone": "string",
  "level": "string"
}

Properties

Name Type Required Description
login_name string false First name of the user.
company_name string false Last name of the user.
email string false Email address of the user
telephone string false telephone number of the user
level string false level of the user.

Pagination

Paginated Response Structure

{
    "from": 0,
    "size": 10,
    "total_hits": 101,
    "hits": [
        ...
    ]
}

All of the batch query APIs (e.g, offer query API, merchant query API, transaction query API) support pagination. They accept the from, size, sort field, and sort order parameters.

Parameter Description
from Indicates the number of initial results that should be skipped.
size Indicates the number of results that should be returned. Max value is 100.
sort_field Indicates the field to sort by - refer to the specific API endpoint for possible sort fields
sort_order Indicates sort order, possible values are always ASC (ascending) or DESC (descending)

The response structure will be include the original from and size parameters to assist in pagination processing.

An additional total_hits field will indicate how many results were found for the specified query.

Refer to the common response structure example on the right.

Errors

The You World API uses the following error codes:

Error Code Meaning
400 Bad Request -- There is something wrong with the request. Inspect the response for possible explanation.
403 Forbidden -- Unauthorized or incorrect method of accessing the resource
404 Not Found -- Incorrect or nonexistent resource access
405 Method Not Allowed -- Incorrect HTTP method for this resource
429 Too Many Requests -- Exceeded quota limits. Please wait and try again.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarially offline for maintanance. Please try again later.