NAV
json

Introduction

You can try out the API by using the sandbox located at https://product-api.europeansourcing.com/sandbox

Changelog

Changelog{:target=”_blank”}

Sandbox

https://product-api.europeansourcing.com/sandbox

Note:

Marking Calculation API

you can see here, how to calculate the markings. (
in French)

https://product-api.europeansourcing.com/api/v1.1/marking/fr/calculatePrice

Here’s an example of calculation

{
"variant_id": 2743807,
"marking_id": 2898372,
"quantityM": 50,
"nbColor": 1
}

The request sent to the API must be a valid JSON.

Request

Field Type of value Possible value
quantityM integer Quantity ordered
variant_id long Id of variant
marking_id long Id of marking
nbColor integer Number of color
nbLogo integer Number of logo
nbPosition integer Number of position
length float Length to calculate area (area = length * width)
width float Width to calculate area (area = length * width)
diameter float Diameter to calculate area (area = (diameter/2)² * PI)
squared_size float Squared size to calculate area (area = squared_size)
default_marking_margin float Supplier margin applied to marking price
default_margin float Supplier margin applied to price
supplierPrices object price used to replace database default price

SupplierPrices

{
"variant_id": 3328195,
"marking_id": 2908203,
"quantityM": null,
"nbColor": 2,
"supplierPrices": {
"static_fixed_price": 40.0,
"dynamic_variable_price": "40 * nb_couleurs",
"variant_price": "2.5",
"option_static_variable_price": "5.0"
}

}

Field Type of value Possible value
variant_price float Price of variant for each unit
static_variable_price float Static variable price
dynamic_variable_price string Dynamic variable price
static_fixed_price float Static fixed price
dynamic_fixed_price string Dynamic fixed price
option_static_variable_price float Option static price
option_dynamic_variable_price string Option dynamic price

Response

{
"defaultPrice": 2.5,
"costSupplierOption": 250.0,
"nameVariant": "gravure laser",
"costByQuantity": 17.3,
"nameOptions": [
"manutention"
],

"optionTarif": true,
"quantity": 25,
"price": 432.5,
"markingPrice": 120.0,
"priceWithoutMarking": 62.5,
"calculationDetails": [
{
"label": "basicPrice",
"quantity": 25,
"price": 2.5,
"total": 62.5
},

{
"label": "staticFixedPrice",
"total": 40.0
},

{
"label": "dynamicVariablePrice",
"formula": "40 * nb_couleurs",
"total": 80.0
},

{
"label": "optionStaticVariablePrice",
"quantity": 25,
"optionCount": 2,
"price": 5.0,
"total": 250.0
}

]
}

Field Type of value Possible value
defaultPrice float Basic unit price
costSupplierOption float Price of supplier option
nameVariant string Variant name
costByQuantity float Cost by quantity
nameOptions array of strings List of option name
optionTarif boolean Has a option in price
quantity float Quantity
price float Total price
markingPrice float Marking price
priceWithoutMarking float Price without mrking
included_in_variant_prices boolean The marking price is included in variant price (field from the marking api)
total_price boolean The price is included in the marking price
calculationDetails array of object Calculation details
error string error mesafe

CalculationDetails

Field Type of value Possible value
label string Label of detail row:
  • basicPrice
  • dynamicFixedPrice
  • staticFixedPrice
  • staticVariablePrice
  • dynamicVariablePrice
  • optionDynamicVariablePrice
  • optionStaticVariablePrice
quantity integer Quantity
optionCount integer Number of option
price float Unit price
formula string Formula use to calculate for dynamic price
total float Total price
total_price boolean The price is included in the marking price (field from the marking api static_variable_price_holder.total_price or dynamic_variable_price_holder .total_price)
promo float Promotion apply to the price

Example scripts (PHP)

You can download here a set of PHP scripts for each endpoint.

Product API

Export API

https://product-api.europeansourcing.com/api/v1.1/search/scroll

The export API is similar to
the ElasticSearch’s
scroll API
.

The limit by request is fixed to 50.

There are 2 steps

First request

{
"lang": "fr",
"limit": 50,
"search_handlers": [
{
"supplier_id": {
"include": [
400
]
}
,

"last_indexed": {
"since": "2019-03-01T12:20:01+01:00"
}

}

]
}

In the response, you will have a “scroll_id” field

All following requests (insert your own scroll_id returned by the first request)

{
"scroll_id": "xxxxxxxxxxx"
}

Search API

https://product-api.europeansourcing.com/api/v1.1/search

Here’s an example of a json search. Obviously, this example will not return any item as it is, its just to help
understanding how it works.

{
"lang": "fr",
"sort_field": "last_indexed_at",
"sort_direction": "asc",
"include_fields": [
"id",
"variants.name"
],

"exclude_fields": [],
"page": 1,
"limit": 10,
"search_handlers": [
{
"id": {
"include": [
"1234"
]
}
,

"supplier_id": {
"exclude": [
"338"
]
}
,

"supplier_profile_id": {
"include": [
"144"
]
}
,

"supplier_base_reference": {
"include": [
"REF1"
],

"exclude": [
"REF2"
]
}
,

"supplier_reference": {
"include": [
"REF3"
]
}
,

"country_of_origin": {
"exclude": [
"CN"
]
}
,

"brand_id": {
"include": [
"1049"
]
}
,

"variant_id": {
"include": [
"12"
]
}
,

"variant_reference": {
"include": [
"AJ"
],

"type": "like"
}
,

"has_marking": true,
"marking_include_in_variant_price": true,
"label_id": {
"exclude": [
"32"
]
}
,

"internal_reference": {
"include": [
"INT_REF"
]
}
,

"marking_id": {
"include": [
"20"
],

"exclude": [
"25"
]
}
,

"last_indexed": {
"since": "2020-01-08T00:00:00.000+0000"
}
,

"query": "bag",
"stock_greater_than": 3,
"category_id": {
"include": {
"ids": [
"2499",
"2421"
]
}

}
,

"attribute_id": {
"include": {
"ids": [
964,
1463
],

"operator": "and"
}

}
,

"price": {
"min": 5.01,
"max": 8.19
}

}

]
}

The request sent to the API must be a valid JSON.

Request

Field Type of value Possible value
lang* string
  • ca
  • da
  • de
  • en
  • es
  • fi
  • fr
  • it
  • nl
  • no
  • pl
  • pt
  • ro
  • sv
page integer Any integer greater than 0 (default : 1). Choose page or offset, not both.
offset integer Any integer greater than 0 (default : 0). Choose page or offset, not both.
limit integer Any integer greater than 0 (default : 52)
sort_field string
  • relevance
  • price
  • last_indexed_at
  • updated_at
  • cycle
cycle sort result by supplier: product xxx supplier S1, product xxx supplier S2, xxx S3, xxx S4, xxx S1, xxx S2, xxx S3, xxx S4, xxx S1 … (default : relevance)
sort_direction string asc,desc (default : desc if sort field is relevance, asc otherwise)
include_fields array of strings An array that contains any field name (such as id, variants.name, variants.variant_prices)
exclude_fields array of strings An array that contains any field name (such as id, variants.name, variants.variant_prices)
include_aggregations array of string An array that contains any aggregation name. If empty, return brands, attributes, categories, suppliers, supplier_profiles, marking, country and country_of_origin.
enable_aggregations boolean (default true) Set to false to disable aggregations if not needed. Can significantly improve performance if disabled. If include_aggregations is specified this field has no effect
search_handlers array of arrays An array that contains Search Handler objects
one_variant boolean Return only one variant.
include_total_variants boolean Return in pagination the number of variant of the request(field total_variant).

Search handler

Field Sub-field Type of value Possible value
query string A string query
last_indexed
  • since
  • before
string a string containing a date and a time (ISO8601)
id
  • include
  • exclude
Array of strings Strings containing ids of product
supplier_id
  • include
  • exclude
Array of strings Strings containing ids of supplier
supplier_profile_id
  • include
  • exclude
Array of strings Strings containing ids of supplier profile
supplier_base_reference
  • include
  • exclude
Array of strings Strings containing a reference
supplier_reference
  • include
  • exclude
Array of strings Strings containing a reference
country_code (only if token is authorized to search on a country) string String containing a country code
country_of_origin
  • include
  • exclude
Array of strings Strings containing two letters country code (‘FR’, ‘GB’, etc…)
country_supplier_profile String Strings containing two letters country code (‘FR’, ‘GB’, etc…)
brand_id
  • include
  • exclude
Array of strings Strings containing ids of brands
stock_greater_than integer Any integer greater than 0.
variant_id
  • include
  • exclude
array of strings Strings containing a variant id.
has_marking boolean Has marking.
marking_include_in_variant_price boolean Marking price is included in variant price.
has_supplier_option boolean Has supplier option for price.
variant_reference
  • include
  • exclude
array of strings Strings containing a variant internal reference.
internal_reference
  • include
  • exclude
array of strings String containing an internal_reference.
marking_id
  • include
  • exclude
array of strings Strings containing a marking id.
attribute_id
  • include with operator
    • id
    • operator
  • exclude with operator
    • id
    • operator
array of strings String containing attribute id with operator (and/or).
Ex: Search on attribute white and black :
attribute_id: {
“include”: {“id”: [“964”, “1463”], “operator”: “and”}
}
price
  • min
  • max
  • quantity
  • onlyOnEstimation
float (2 decimals max.), float, integer, boolean Any float number with a maximum of 2 decimals (eg. 12.15 ; 20). Quantity is used only with min or max value. if OnlyOnEstimation, min, max and quantity are ignore
all_reference
  • include
  • exclude
array of strings Search on multiple references (product, variant, supplier).
has_carbon_footprint boolean Has carbon footprint.
has_carbon_footprint_textile boolean Has textile carbon footprint.
has_dpp boolean Has DPP url.

Search Light API

https://product-api.europeansourcing.com/api/v1.1/search/light

Here’s an example of a json search. Obviously, this example will not return any item as it is, its just to help
understanding how it works.

{
"lang": "fr",
"sort_field": "last_indexed_at",
"sort_direction": "asc",
"page": 1,
"limit": 10,
"search_handlers": [
{
"id": {
"include": [
"1234"
]
}
,

"supplier_id": {
"exclude": [
"338"
]
}
,

"supplier_profile_id": {
"include": [
"144"
]
}
,

"supplier_base_reference": {
"include": [
"REF1"
],

"exclude": [
"REF2"
]
}
,

"supplier_reference": {
"include": [
"REF3"
]
}
,

"country_of_origin": {
"exclude": [
"CN"
]
}
,

"brand_id": {
"include": [
"1049"
]
}
,

"variant_id": {
"include": [
"12"
]
}
,

"variant_reference": {
"include": [
"AJ"
],

"type": "like"
}
,

"has_marking": true,
"marking_include_in_variant_price": true,
"label_id": {
"exclude": [
"32"
]
}
,

"internal_reference": {
"include": [
"INT_REF"
]
}
,

"marking_id": {
"include": [
"20"
],

"exclude": [
"25"
]
}
,

"last_indexed": {
"since": "2020-01-08T00:00:00.000+0000"
}
,

"query": "bag",
"stock_greater_than": 3,
"category_id": {
"include": {
"ids": [
"2499",
"2421"
]
}

}
,

"attribute_id": {
"include": {
"ids": [
964,
1463
]
}

}
,

"price": {
"min": 5.01,
"max": 8.19
}

}

]
}

The request sent to the API must be a valid JSON.

Request

Same as Search API search APi request

but include_fields and exclude_fields are ignored


Search handler

Same as Search API search APi search handler

Sending the request

curl -X POST \
https://product-api.europeansourcing.com/api/v1.1/search \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%' \
-d '{"lang": "fr","include_fields": [],"exclude_fields": [],"page": 1,"search_handlers": [{"query": "sac", "category_id": {"include": {"ids": ["1291", "150"]}}}]}'

You can use cURL to send your request to the EuropeanSourcing API. If you use PHP, you can also use it
with example script.

Response

General Purpose

The response provided by the API is in JSON format and includes the following fields :

Field Type Comment
total_time integer Value in millisecond
pagination object
products array Contains product objects
aggregations array Contains aggregation fields

Pagination

{
"current": 1,
"first": 1,
"previous": null,
"next": 2,
"last": 14,
"limit": 52,
"total_items": 702,
"total_variant": 10400
}

Field Type Comment
current integer
first integer
previous integer|null
next integer|null
last integer
total_items integer
total_variant integer|null only if include_total_variant is true in the request

Product

Parent: Root

{
"id": 827,
"has_marking": true,
"last_indexed_at": "2017-11-08T16:00:44+0100",
"country_of_origin": "IT",
"main_product_image_id": null,
"variants": [],
"union_customs_code": "62 06 30 00",
"main_category_id": 930,
"labels": [],
"product_images": [],
"main_variant_id": 2540,
"supplier": {},
"categories": [],
"supplier_base_reference": "2436",
"internal_reference": "QVJ8NV",
"brand": {}
}

Field Type API Comment
id long search, searchLight
has_marking boolean search, searchLight See marking endpoint
main_category_id long|null search
main_variant_id long search First variant when there is no “best variant”
best_variant_id long|null search When you send “textual query”, like “yellow pen”, the result contains products which have at least one yellow variant. The best variant is the id of this variant.
main_product_image_id long|null search
main_variant object searchLight Contains variant object, First variant when there is no “best variant”
best_variant object|null searchLight Contains variant object, When you send “textual query”, like “yellow pen”, the result contains products which have at least one yellow variant. The best variant is the id of this variant.
country_of_origin string|null search ISO3166-1 alpha-2 format
union_customs_code string|null search See https://en.wikipedia.org/wiki/Union_Customs_Code
supplier_base_reference string search, searchLight
internal_reference string search, searchLight
supplier object search, searchLight Contains supplier objects.
brand object|null search, searchLight Contains brand objects.
product_images array|null search Contains product image objects. Ordered from first to last.
categories array search Contains category objects
variants array search Contains variant objects
labels array|null search Contains label objects
extremum_price array|null search, searchLight Highest and lowest price by supplier profile
last_indexed_at string|null search ISO8601 format
created_at string search ISO8601 format
updated_at string search ISO8601 format

Brand

Parent: Product

{
"name": "Fruit of the Loom",
"id": 151,
"suffix": "registered_trademark",
"slug": "fruit-of-the-loom",
"logo": {
"id": 23,
"original_filename": "bg5745972c59dad.jpeg",
"url": "https://uploads.europeansourcing.com/bg5745972c59dad.jpeg"
}

}

Field Type API Comment
id long search, searchLight
name string search, searchLight Does not contain any symbol
slug string search Slug of the name
suffix string search
  • registered_trademark
  • trademark
  • copyright
logo object|empty search image object.

Category

Parent: Product

{
"id": 930,
"name": "stylo bille",
"slug": "stylo-bille",
"full_hierarchy_name": "STYLOS - ÉCRITURE > stylos > stylo bille",
"parent_id": 945
}

Field Type Comment
id long
name string
slug string
full_hierarchy_name string breadcrumb of all parents names separated by ‘>’
parent_id long|null

Supplier

Parent: Product

{
"id": 475,
"name": "CLIPPER BV",
"legal_name": "CLIPPER BV",
"slug": "clipper-bv",
"vat_identification_number": null,
"supplier_profiles": [
{
"country_code": "FR",
"name": "CLIPPER BV (FR)",
"association": null,
"id": 25
}

]
}

Field Type API Comment
id long search, searchLight
name string search, searchLight Commercial name
slug string search Slug of the name
legal_name string search, searchLight
vat_identification_number string|null search See https://en.wikipedia.org/wiki/VAT_identification_number
supplier_profiles array search Contains full supplier profile objects

Supplier Profile

Parent: Supplier

{
"id": 3101,
"name": "TRANSWORLD TRADERS-THE COTTON FACTORY (TWT)",
"country_code": "FR",
"address_line1": "40 boulevard Henri Sellier",
"address_line2": null,
"postal_code": "92150",
"locality": "SURESNES",
"association": null
}

When a short version of supplier profile is included, you will only have the data as below :

{
"id": 3101,
"country_code": "FR"
}

Field Type Comment
id long
name string Commercial name
country_code string ISO 3166-1 alpha-2 format
address_line1 string|null
address_line2 string|null
postal_code string|null
locality string|null
association string|null associations list with comma

When a short version of supplier profile is included, you will only have the data as below :

Field Type Comment
id long
country_code string ISO 3166-1 alpha-2 format

Image

{
"id": 23,
"original_filename": "bg5745972c59dad.jpeg",
"url": "https://uploads.europeansourcing.com/bg5745972c59dad.jpeg"
}

Field Type API Comment
id long search, searchLight
original_filename string search
url string search, searchLight

Label

{
"id": 47,
"name": "Made In Europe",
"slug": "made-in-europe"
}

Parent: Product (in an array)

Field Type Comment
id long
name string
slug string

Variant

{
"variant_sizes": [],
"variant_packaging": {},
"variant_markings": [],
"description": "Stylo à écriture bleue accents de couleur, clip en anneaux en métal. Fabriqué en Italie. Marquage : sérigraphie, sur le corps, 4 couleurs max. Matière : matière synthétiqueEcriture bleue.Made in Italy",
"marking_additional_information": null,
"supplier_reference": "243660",
"net_weight": "11",
"main_variant_image_id": 6969,
"variant_minimum_quantities": [],
"variant_prices": [],
"id": 2504,
"stock": null,
"gross_weight": null,
"slug": "raja-stylo",
"variant_images": [],
"raw_description": "Stylo à écriture bleue accents de couleur, clip en anneaux en métal. Fabriqué en Italie. Marquage : sérigraphie, sur le corps, 4 couleurs max. Matière : matière synthétiqueEcriture bleue.Made in Italy",
"european_article_numbering": null,
"variant_sample_prices": [],
"variant_external_links": [],
"name": "Raja stylo",
"variant_list_prices": [],
"attributes": [],
"mandatory_marking": false
}

Parent: Product (in an array)

Field Type API Comment
id long search, searchLight
name string search, searchLight
slug string search Slug of the name
description string|null search Without html tag inside. If you want to keep them, please refer to the raw_description field.
raw_description string|null search With html tags inside. If you want to have a purified description, please refer to the description field.
marking_additional_information string|null search
  • more_marking_available if the “variant_markings” array is empty, it means we know there are markings available for this variant, but we have no information about them. if it’s not empty it means we know there are more markings available for this variant than the ones we provide unmarkable.
  • “unmarkable” the variant is not markable at all
supplier_reference string search, searchLight
internal_reference string search, searchLight
net_weight float|null search Weight without packaging.
gross_weight float|null search Weight with the packaging. To have the weight without the packaging, please refer to the net_weight field
stock integer|null search
variant_sizes array|null search Contains variant size objects
variant_packaging object|null search variant_packaging object
supplier_profiles array search, searchLight Contains short supplier profile objects
main_variant_image_id long|null search
main_variant_image object|null searchLight Contains Image object
variant_minimum_quantities array|null search, searchLight Contains variant minimum quantity objects
variant_prices array|null search Contains variant price objects
variant_images array search Contains Image objects. Ordered from first to last.
european_article_numbering string|null search See https://en.wikipedia.org/wiki/International_Article_Number
variant_sample_prices array|null search Contains variant sample price objects
variant_external_links array|null search Contains variant external link objects
variant_list_prices array|null search Contains variant list price objects
attributes array|null search Contains attribute objects. For multiples attributes of the same multiple attribute group the order matters (primary / secondary color for example)
mandatory_marking boolean search If true, it means that the variant must absolutely be marked to be ordered.
variant_delivery_times array|null search Contains variant delivery time objects
keywords array search Deprecated always empty
last_price_update date|null search ISO format
last_image_update date search ISO format
marking_included_in_variant_prices boolean|null search

Variant Size

{
"id": 15,
"type": "width",
"value": 125.600
}

Parent: Variant (in an array)

Field Type Comment
id long
type string|null
  • length
  • width
  • depth
  • diameter
  • thickness
  • height
value float

Variant Packaging

{
"id": 68,
"parent_id": 67,
"type": "plastic_bag",
"inner_quantity": 80,
"weight": "500.000",
"variant_packaging_sizes": [],
"hierarchy": [
{
"id": 67,
"parent_id": null,
"type": null,
"inner_quantity": null,
"weight": null,
"variant_packaging_sizes": []
}

]
}

Parent: Variant

Field Type Comment
ìd long
parent_id long|null
type string|null
  • pallet
  • cardboard_box
  • plastic_bag
inner_quantity integer|null The number of pieces inside this packaging
weight float|null
variant_packaging_sizes array Contains variant packaging size objects
hierarchy* array|null Contains variant packaging objects (parent and parent of parent etc…). These objects are at the same level and do not contain a hierarchy field.

*Only in top level object.

Variant Packaging Size

{
"id": 2,
"type": "length",
"value": "366.600"
}

Parent: Variant Packaging (in an array)

Field Type Comment
id long
type string
  • length
  • width
  • depth
  • diameter
value float

Variant Minimum Quantity

{
"value": 100,
"supplier_profile": {}
}

Parent: Variant

Field Type Comment
value integer|null Null means not minimum quantity defined
supplier_profile object The short version of supplier profile object

Attribute

{
"id": 1029,
"slug": "bleu-ciel",
"type": "multiple",
"value": "bleu ciel",
"hierarchy": [
{
"id": 995,
"slug": "bleu",
"value": "bleu",
"parent_id": null,
"project_id": 995,
"additional_text_data": "0000FF",
"full_hierarchy_value": "bleu"
}

],

"parent_id": 995,
"project_id": 1029,
"attr_position": 0,
"attribute_group": {
"id": "multiple_4",
"name": "Couleurs",
"slug": "couleurs",
"additional_text_data_type": "hexadecimal_color_type"
}
,

"additional_text_data": "77B5FE",
"full_hierarchy_value": "bleu > bleu ciel"
}

Parent: Variant

Field Type Comment
id long
attribute_group* object|null attribute_group object
parent_id long|null
hierarchy array|null Contains attribute objects (parent and parent of parent etc…). These objects are at the same level and do not contain a hierarchy field, neither an attribute_group field.
full_hierarchy_value string Breadcrumb of all parents (full hierarchy) values - the separator is “>”
type string|null
  • multiple
  • simple

Multiple means the attribute belongs to a multiple attribute group (the same variant can have multiple attributes from the same multiple attribute group (for example colors, a t-shirt can be blue and green))
Simple means the attribute belongs to a simple attribute group (the same variant can only have one attribute from the same simple attribute group (for examples sizes, a t-shirt cannot be S and XL size at the same time))
value string
slug string Slug of the value.
attr_position integer
additional_text_data string|null

*Only in top level object.

Attribute Group

{
"id": "multiple_4",
"name": "Couleurs",
"slug": "couleurs",
"additional_text_data_type": "hexadecimal_color_type"
}

Parent: Attribute

Field Type Comment
id string
name string
slug string Slug of the name
additional_text_data_type string|null

Variant Delivery Time

{
"id": 2,
"value": 7,
"supplier_profile": {}
}

Parent: Variant

Field Type Comment
id long
value integer
supplier_profile object The short version of supplier profile object

Variant Price

{
"id": 1291162612,
"value": 1.9,
"to_quantity": 11,
"from_quantity": 1,
"reduced_value": null,
"supplier_profile": {
"id": 1418,
"country_code": "FR"
}
,

"calculation_value": 1.9
}

Parent: Variant (in a array)

Field Type Comment
id long
value float
reduced_value float|null
calculation_value float The calculation value is the value when there is no reduced value, or else it’s the reduced value
from_quantity integer From which quantity the price must be applied
to_quantity integer|null To which quantity the price must be applied
supplier_profile object The short version of supplier profile object

Variant Sample Price

{
"id": 847270,
"value": 0.35,
"reduced_value": null,
"supplier_profile": {
"id": 357,
"country_code": "NL"
}
,

"calculation_value": 0.35
}

Parent: Variant (in a array)

Field Type Comment
id long
value float
reduced_value float|null
calculation_value float The calculation value is the value when there is no reduced value, or else it’s the reduced value
supplier_profile object The short version of supplier profile object

Variant List Price

{
"id": 17071,
"value": 3.5,
"reduced_value": null,
"supplier_profile": {
"id": 728,
"country_code": "FR"
}
,

"calculation_value": 3.5
}

Parent: Variant (in a array)

Field Type Comment
id long
value float
reduced_value float|null
calculation_value float The calculation value is the value when there is no reduced value, or else it’s the reduced value
supplier_profile object The short version of supplier profile object
{
"id": 704566,
"url": "https://vimeo.com/207773686",
"type": "simple",
"project_id": 704566
}

Parent: Variant (in a array)

Field Type Comment
id long
type string
  • simple
  • image_360
  • youtube
url string

Aggregation

{
"include_aggregations": [
"country",
"country_of_origin"
],

"search_handlers": [
]
}

Field Type Comment
name string
  • brands
  • suppliers
  • attributes
  • categories
  • supplier_profiles
  • country
  • country_of_origin
rows array Contains objects. Depending on the name.

Row : Brand

{
  "id": "298",
  "count": 83,
  "name": "PI Design",
  "slug": "pi-design"
}
Field Type API Comment
id long search, searchLight
name string search, searchLight
slug string search Slug of the name
logo string searchLight Url of the logo
count integer search, searchLight Number of products

Row : Supplier

{
"id": "397",
"count": 1,
"name": "PARTY PRO"
}

Field Type Comment
id long
name string
slug string
count long Number of products

Row : Attribute

{
"id": 964,
"count": 1,
"group_id": "4",
"value": "blanc",
"slug": "blanc",
"contacts": []
}

Field Type Comment
id long
value string
count long Number of products
group_id long Id of the attribute group
group_name string name of the attribute group

Row : Category

{
"id": "1027",
"count": 1,
"parent": "1037",
"full_hierarchy_name": "FÊTE - ÉVÉNEMENTIEL > déguisement > accessoire",
"slug": "accessoire"
}

Field Type Comment
id long
name string
slug string Slug of the name
count long Number of products
parent long|null Id of the parent category
full_hierarchy_name string

Row : Supplier Profile

{
"id": "92",
"count": 1,
"name": "PARTY PRO"
}

Field Type API Comment
id long search, searchLight
name string search, searchLight
country_code string searchLight
count long search, searchLight Number of products
top_score float search, searchLight Best product score for request with query field

Row : Country

{
"code": "FR",
"count": 1
}

Field Type Comment
code string country code
count long Number of products

Row : Country_of_origin

{
"code": "FR",
"count": 1
}

Field Type Comment
code string country code
count long Number of products

Brand API

Brands for a token

Request

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/brands \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/brands

Use this endpoint to get all brands.

Response

Field Type Comment
id long
name string
slug string Slug of the name
suffix string
  • registered_trademark
  • trademark
  • copyright
count long Number of products

Brands for a supplier

Request

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/brands/supplier/328 \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/brands/supplier/{supplier_id}

Use this endpoint to get all brands for a supplier.

Response

Field Type Comment
id long
name string
suffix string
  • registered_trademark
  • trademark
  • copyright
image_path integer Brand image image url

Brands for a supplier profile

Request

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/brands/supplier_profile/4 \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/brands/supplier_profile/{supplier_profile_id}

Use this endpoint to get all brands for a supplier.

Response

Field Type Comment
id long
name string
suffix string
  • registered_trademark
  • trademark
  • copyright
image_path integer Brand image image url

Product deleted API

Request

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/products/deletedAfter/2020-05-12 \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/products/deletedAfter/yyyy-MM-dd

Use this endpoint to get all deleted product after or equal to date.

Response

Field Type Comment
product_id Number product id
internal_reference string
supplier_base_reference string
deleted_at date ISO format
supplier_id Number Supplier id

Category API

Request

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/categories/fr \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/categories/{lang}(/{lvl})

Use this endpoint to get all categories. (Optional) You can filter on categories level.
There are 3 levels.

Response

Field Type Comment
id long
name string
slug string Slug of the name
count long Number of products
full_hierarchy_name string breadcrumb of all parents names separated by ‘>’
parent long|null Id of the parent
children array long Array of children ids

Marking API

Request Variant marking

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/markings/fr/2748463 \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/markings/{lang}/{variant_id}

Use this endpoint to get the markings data for one variant.
A variant may have no markings data, the endpoint will then return an empty array.

Request Export all marking

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/markings/fr/export?page=1&fromDate=2024-10-07T01:30:00.000 \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'
Param Type of value Possible value
page integer Page to export
limit integer Number of result per page (limit to 50)
fromDate yyyy-MM-dd’T’HH:mm:ss. SSSXXX iso date (ex: 2024-10-07T01:30:00.000) Export with last updated date greater than fromDate

`https://product-api.europeansourcing.com/api/v1.1/markings/{lang}/export?param=value

Use this endpoint to export the markings data.

Response

Variant Marking

{
"free_entry_squared_size": false,
"supplier_profiles": [],
"type": "supplier",
"minimum_length": null,
"minimum_diameter": null,
"number_of_positions": null,
"free_entry_number_of_logos": false,
"number_of_logos": null,
"maximum_diameter": null,
"diameter": null,
"free_entry_width": false,
"minimum_number_of_positions": null,
"free_entry_length": false,
"static_variable_price_holders": [],
"id": "supplier_720",
"minimum_number_of_colors": null,
"free_entry_diameter": false,
"static_fixed_prices": [],
"full_color": false,
"marking_position": {},
"free_entry_number_of_colors": false,
"maximum_number_of_positions": null,
"free_entry_number_of_positions": false,
"maximum_quantity": null,
"minimum_number_of_logos": null,
"length": "40.000",
"minimum_width": null,
"minimum_squared_size": null,
"dynamic_variable_price_holders": [],
"number_of_colors": null,
"supplier_marking": {},
"marking": {},
"maximum_length": null,
"squared_size": null,
"width": "15.000",
"maximum_number_of_logos": null,
"comment": null,
"maximum_width": null,
"minimum_quantity": null,
"maximum_number_of_colors": 4,
"dynamic_fixed_prices": [],
"maximum_squared_size": null,
"key": "abcd",
"use_only_variant_prices": true
}

Parent: Variant (in a array)

Field Type Comment
id long
key string Key of the marking. Unique by marking type (supplier/simple).
type string
  • simple
  • supplier (you have access to the “supplier_marking” object)
full_color boolean
use_only_variant_prices boolean Used in price calculation
minimum_quantity integer|null
maximum_quantity integer|null
squared_size float|null
minimum_squared_size float|null
maximum_squared_size float|null
free_entry_squared_size boolean True if the user can enter the squared size himself / should be between the related minimum and maximum squared size if they are set / always false if a specific squared size is set
width float|null
minimum_width float|null
maximum_width float|null
free_entry_width boolean True if the user can enter the width himself / should be between the related minimum and maximum width if they are set / always false if a specific width is set
length float|null
minimum_length float|null
maximum_length float|null
free_entry_length boolean True if the user can enter the length himself / should be between the related minimum and maximum length if they are set / always false if a specific length is set
number_of_logos integer|null
minimum_number_of_logos integer|null
maximum_number_of_logos integer|null
free_entry_number_of_logos boolean True if the user can enter the number of logos himself / should be between the related minimum and maximum number of logos if they are set / always false if a specific number of logos is set
diameter float|null
minimum_diameter float|null
maximum_diameter float|null
free_entry_diameter boolean True if the user can enter the diameter himself / should be between the related minimum and maximum diameter if they are set / always false if a specific diameter is set
number_of_colors integer|null
minimum_number_of_colors integer|null
maximum_number_of_colors integer|null
free_entry_number_of_colors boolean True if the user can enter the number of colors himself / should be between the related minimum and maximum number of colors if they are set / always false if a specific number of colors is set
number_of_positions integer|null
minimum_number_of_positions integer|null
maximum_number_of_positions integer|null
free_entry_number_of_positions boolean True if the user can enter the number of positions himself / should be between the related minimum and maximum number of positions if they are set / always false if a specific number of colors is set
static_variable_price_holders array Contains static variable price holder objects
static_fixed_prices array Contains static fixed price objects
dynamic_variable_price_holders array Contains dynamic variable price holder objects
dynamic_fixed_prices array Contains dynamic fixed price objects.
marking object
marking_position object
supplier_marking object|null Null if type field is simple
supplier_profiles array Contains short supplier profile objects.
comment string|null Comment about this specific variant marking (might contain additional information about this variant marking)

Marking Position

{
"name": "corps",
"id": "161",
"slug": "corps"
}

Parent: Variant Marking

Field Type Comment
id long
name string
slug string Slug of the name

Marking

{
"full_hierarchy_name": "impression > sérigraphie",
"parent_id": "20",
"hierarchy": [
{
"full_hierarchy_name": "impression",
"parent_id": null,
"name": "impression",
"id": "20",
"slug": "impression"
}

],

"name": "sérigraphie",
"id": "32",
"slug": "serigraphie"
}

Parent: Variant Marking

Field Type Comment
id long
name string
slug string Slug of the name
full_hierarchy_name string Breadcrumb of all parents (full hierarchy) names - the separator is “>”
parent_id long
hierarchy* array Contains marking objects (parent and parent of parent etc…). These objects are at the same level and do not contain a hierarchy field.

*Only in top level object.

Supplier Marking

{
"supplier_marking": {
"id": 1326,
"code": "S1",
"comment": "If your logo contains red or white, a flat tint fee of €30 will be charged / Options: blowing ink +€0.11 - Arm/Collar marking +€0.12",
"name_complement": "-"
}

}

Parent: Variant Marking

Field Type Comment
id long
name string
code string Unique code of the supplier marking
comment string
name_complement string

Static Variable Price Holder

{
"condition": null,
"total_price": false,
"marking_fees": [],
"id": "supplier_19",
"supplier_profile": {},
"static_variable_prices": []
}

Parent: Variant Marking (in a array)

Field Type Comment
id long
condition print_formula|null Condition to check to apply this price / null if no special condition - when null it must be interpreted as true so the price must always be added
total_price boolean True if this price represents the whole price of the variant when this variant marking is selected (so the normal variant_prices should not be taken into account) - if several prices matches then all of them should either declare total_price to false or all to true - if this is not the case, this is an indexation error and the total returned price should be “in quotes” / will always be false when the variant’s marking type is “supplier”
marking_fees array Contains marking fee objects.
supplier_profile object The short version of supplier profile object
static_variable_prices array Contains static variable price object.

Static Variable Price

{
"calculation_value": "0.180",
"reduced_value": null,
"id": "simple_158",
"from_quantity": 1,
"value": "0.180"
}

Parent : Static Variable Price Holder (in an array)

Field Type Comment
id long
value float
reduced_value float
calculation_value float The calculation value is the value when there is no reduced value, or else it’s the reduced value
from_quantity integer From which quantity the price must be applied

Static Fixed Price

{
"condition": null,
"calculation_value": "18.650",
"total_price": false,
"marking_fees": [],
"id": "supplier_20",
"reduced_value": null,
"value": "18.650",
"supplier_profile": {}
}

Parent: Variant Marking (in a array)

Field Type Comment
id long
condition print_formula|null Condition to check before applying this price / null if no special condition - when null it must be interpreted as true so the price must always be added
value float
reduced_value float
calculation_value float The calculation value is the value when there is no reduced value, or else it’s the reduced value
from_quantity integer From which quantity the price must be applied
total_price boolean True if this price represents the whole price of the variant when this variant marking is selected (so the normal variant_prices should not be taken into account) - if several prices matches then all of them should either declare total_price to false or all to true - if this is not the case, this is an indexation error and the total returned price should be “in quotes�? / will always be false when the type of the variant marking is “supplier”
supplier_profile object The short version of supplier profile object

Dynamic Variable Price Holder

{
"condition": null,
"total_price": false,
"marking_fees": [],
"id": "supplier_19",
"supplier_profile": {},
"dynamic_variable_prices": []
}

Parent: Variant Marking (in a array)

Field Type Comment
id long
condition print_formula|null Condition to check to apply this price / null if no special condition - when null it must be interpreted as true so the price must always be added
total_price boolean True if this price represents the whole price of the variant when this variant marking is selected (so the normal variant_prices should not be taken into account) - if several prices matches then all of them should either declare total_price to false or all to true - if this is not the case, this is an indexation error and the total returned price should be “in quotes” / will always be false when the type of the variant marking is “supplier”
marking_fees array Contains marking fee objects.
supplier_profile object The short version of supplier profile object
dynamic_variable_prices array Contains dynamic variable price object.

Dynamic Variable Price

{
"calculation_value": "0.180*nb_couleurs",
"reduced_value": null,
"id": "simple_158",
"from_quantity": 1,
"value": "0.180*nb_couleurs"
}

Parent : Dynamic Variable Price Holder (in an array)

Field Type Comment
id long
value float
reduced_value float
calculation_value float The calculation value is the value when there is no reduced value, or else it’s the reduced value
from_quantity integer From which quantity the price must be applied

Dynamic Fixed Price

{
"condition": null,
"calculation_value": "29.95*nb_couleurs",
"total_price": false,
"marking_fees": [],
"id": "supplier_20",
"reduced_value": null,
"value": "29.95*nb_couleurs",
"supplier_profile": {}
}

Parent: Variant Marking (in a array)

Field Type Comment
id long
condition print_formula|null Condition to check to apply this price / null if no special condition - when null it must be interpreted as true so the price must always be added
value float
reduced_value float
calculation_value float The calculation value is the value there is no reduced value, else it’s the reduced value
from_quantity integer From which quantity the price must be applied
total_price boolean True if this price represents the whole price of the variant when this variant marking is selected (so the normal variant_prices should not be taken into account) - if several prices matches then all of them should either declare total_price to false or all to true - if this is not the case, this is an indexation error and the total returned price should be “in quotes�? / will always be false when the type of the variant marking is “supplier”
supplier_profile object The short version of supplier profile object

Marking Fee

{
"id": "2",
"name": "livraison",
"slug": "livraison"
}

Parents (in an array) : Static Variable Price
Holder
| Static Fixed Price | Dynamic
Variable Price Holder
| Dynamic Fixed Price

Field Type Comment
id long
name string
slug string Slug of the name

Variant marking type

Request

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/markings/fr/types \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/markings/{lang}/types

Use this endpoint to get the list of available marking type.

Response

Array Of : string

Supplier API

All supplier

Request

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/suppliers \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/suppliers

Use this endpoint to get all suppliers.

Response

{
"id": 798,
"name": "SupplierName",
"count": 46,
"slug": "slug",
"nb_variant": 46,
"contacts": [
{
"emails": [
"supplier@gmail.com"
],

"languages": [
"en"
],

"last_name": "ContactName",
"first_name": "ContactFirstName",
"fax_numbers": [],
"country_code": "PL",
"main_language": "en",
"phone_numbers": [
{
"prefix": "48",
"number": "66666666"
}

],

"personal_title": "mister",
"address": {
"address_line1": "street",
"postal_code": "45-315",
"country_code": "PL",
"locality": "London"
}

}

]
}

Array Of :

Field Type Comment
id long
name string
slug string Slug of the name
count long Number of products
nb_variant long Number of variants
contacts array Contains contact objects

Contact

{
"emails": [
"supplier@gmail.com"
],

"languages": [
"en"
],

"last_name": "ContactName",
"first_name": "ContactFirstName",
"fax_numbers": [],
"country_code": "PL",
"main_language": "en",
"phone_numbers": [
{
"prefix": "48",
"number": "66666666"
}

],

"personal_title": "mister",
"address": {
"address_line1": "street",
"postal_code": "45-315",
"country_code": "PL",
"locality": "London"
}

}

Field Type Comment
emails array Contains string
languages array|null Contains string
last_name string
first_name string
personal_title string|null
country_code string
main_language string
phone_numbers array|null Contains phoneNumber objects
fax_numbers array|null Contains phoneNumber objects
address array|null Contains address objects

Address

{
"address_line1": "street",
"postal_code": "45-315",
"country_code": "PL",
"locality": "London"
}

Field Type Comment
address_line1 string
address_line2 string|null
postal_code string|null
country_code string
locality string

Address

{
"prefix": "48",
"number": "66666666"
}

Field Type Comment
prefix string
number string

Supplier for profile

Request

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/suppliers/supplier_profile/247 \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/suppliers/supplier_profile/{supplier_profile_id}

Use this endpoint to get all suppliers.

Response

Field Type Comment
id long
name string
slug string Slug of the name
count long Number of products

Supplier Profile API

All supplier profile

Request

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/supplier_profiles \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/supplier_profiles

Use this endpoint to get all supplier profiles.

Response

Array Of :

Field Type Comment
id long
name string
slug string Slug of the name
count long Number of products
nb_variant long Number of variant
address_line1 string
address_line2 string|null
postal_code string|null
country_code string
locality string
websites array of string

Supplier profile for supplier

Request

Array Of :

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/supplier_profiles/supplier/502 \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/supplier_profiles/supplier/{supplier_id}

Use this endpoint to get all supplier profiles.

Response

Field Type Comment
id long
name string
slug string Slug of the name
count long Number of products
nb_variant long Number of variant
address_line1 string
address_line2 string|null
postal_code string|null
country_code string
locality string
websites array of string

Token info

Request

Array Of :

curl -X GET \
https://product-api.europeansourcing.com/api/v1.1/tokenInfos \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'x-auth-token: %%TOKEN%%'

https://product-api.europeansourcing.com/api/v1.1/tokenInfos

Use this endpoint to get the number of products and variants the token has access to per profile
and if the profile is filtered only for a specific brand or category, the brand_id or category_id.

Response

Field Type Comment
supplier_profile_infos array|null Contains Supplier Profile Info objects

Supplier Profile Info

{
"supplier_profile_id": 139,
"variant_count": 60045,
"product_count": 2549,
"brand_id": 192
}

Field Type Comment
supplier_profile_id long
variant_count long
product_count long
brand_id long|null
category_id long|null