This is the documentation for the Loupe API service that allows authenticated users to extract all their Bill of Materials (BoM) data from Loupe.
Export calls require authentication and should be performed using a valid access token.
This is the documentation relevant to LinesheetSamplesExport
- Product CSV - click here to download the format.
- Enterprise Costing CSV - click here to download the format.
- Retail Data CSV - click here to download the format.
Request Export Creation
Each export is created asynchronously. To initiate export creation, you need to make a call with needed samples filters which will be applied to all your active linesheet samples.
Endpoint URL: https://enterprise.atelier.technology/api/exports
For example requests and to test this end-point here is the direct Swagger link: Get Exports
💡 Filtered Exports:
You can configure your API call to export only the products that meet any combination of critieria of your choice. There are millions of possible permutations available to you via a combination of the below filters:
-
Query: to isolate a group of products that meet a text search input criteria
-
Seller Companies: to isolate a group of products from a specific vendor of record
-
Converted by CustomerID: to isolate a group of products owned by a specific buyer who owns the product on linesheet
-
Stone Options: to isolate a group of products that meet specific stone criteria
-
Min Carat Weight: to isolate a group of products that meet specific minimum carat weight criteira
-
Max Carat Weight: to isolate a group of products that meet specific maximum carat weight criteria
-
Product Filters: to isolate a group of products that meet specific product criteria
-
Item Status: to isolate a group of products that have a specific sign-off status (Selected vs Confirmed)
-
Centre Stone: to isolate a group of products which have a centre stone
-
SKU CategoryID: to isolate a group of products which a SKU Category (custom values per customer, Enterprise tier feature)
-
Only SKU CategoryID Set: to isolate a group of products which either contain or do not contain a SKU Category value (Enterprise tier feature)
-
Merchandising Hierarchy ID: to isolate a group of products
-
Only Merchandising Hierarchy ID: to isolate a group of products which either contain or do not contain a Merchandising Hierarchy value (Enterprise tier feature)
-
Sourcing Approval: to isolate a group of products that are approved by Sourcing Team (Enterprise Tier only)
-
Sourcing Approval Date: to isolate a group of products which have been been approved by your Sourcing Team since a specific moment in time (Enterprise Tier only)
-
Purchase Method: (previously labelled as Is Memo): to isolate a group of products which are available in a given Purchase Method (Asset vs Memo, Enterprise tier feature)
-
Purchase Method Status: to isolate a group of products which are available in a given Purchase Method Status (Active vs Inactive, Enterprise tier feature)
-
Last Modified: to isolate a group of products which have changed since a certain date & time. You will need to pass the timestamp in your API call. See here for more information.
- User Last Modified: to isolate a group of products which have been changed by a user since a certain date & time. You will need to pass the timestamp in your API call. See here for more information.
- Enterprise Costing Currency: to decide if you want to export your Enterprise component costing data in the vendor quote currency ("supplier" or null) or converted to your company home currency ("home")
This is an example code block to filter the exports according to the below criteria:
- Last Modified later than X date
- Sourcing Approval = Approved (status #3)
- PurchaseMethodStatus = Active (True)
curl --location --request POST 'https://enterprise.atelier.technology/api/exports' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <<access_token>>' \
--data-raw '{
"Type": "LinesheetSamplesExport",
"ExportType": "BomExport",
"ParameterValues": {
"Query": "",
"SellerCompanies": "",
"MinNetWeight": 0,
"MaxNetWeight": "",
"ConvertedByCustomerId": "",
"MinCaratWeight": 0,
"MaxCaratWeight": "",
"Options": "",
"StoneOptions": "",
"ProductFilters": "",
"ItemStatus": "",
"CentreStone": false,
"SkuCategoryId": 0,
"OnlySkuCategoryIdSet": false,
"MerchandisingHierarchyId": 0,
"MerchandisingHierarchyId1": null,
"MerchandisingHierarchyId2": null,
"MerchandisingHierarchyId3": null,
"MerchandisingHierarchyId4": null,
"OnlyMerchandisingHierarchyIdSet": false,
"PurchaseMethod": "",
"PurchaseMethodStatus": true,
"LastModified": "yyyy-MM-dd HH:mm:ss.ffffff",
"UserLastModified": "yyyy-MM-dd HH:mm:ss.ffffff",
"BuyingApprovalStatus": null,
"SourcingApprovalDate": null,
"SourcingApprovalStatus": 3,
"GetEnterpriseCostingCCY": null
}
}'
After the export was created you can get information about Export status and link to download Export file if it’s ready. For this purpose, you need to have Export Id which can be taken from previous request’s response.
Endpoint URL: https://atelier.technology/api/exports/EXPORT_ID
Request method: GET
Headers:
Content-Type = “application/json”
Authorization = "Bearer{{ACCESS_TOKEN}}"
Response example: (Export is Ready for download)
Status = 200 OK
{
"value": {
"id": "EXPORT_ID",
"dataTransferType": "Export",
"status": "ReadyForDownload",
"fileUrl": "FILE_DOWNLOAD_LINK",
"createdAt": "2018-09-03T14:07:54.015134",
"labels": null,
"archived": false
},
"next": null,
"_links": {
"self": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
},
"update": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
}
}
}
Response example: (Export is not yet created)
Status = 200 OK
{
"value": {
"id": "EXPORT_ID",
"dataTransferType": "Export",
"status": "Pending",
"fileUrl": null,
"createdAt": "2018-09-03T14:07:54.015134",
"labels": null,
"archived": false
},
"next": null,
"_links": {
"self": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
},
"update": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
}
}
}
Response example: (Export creation Failed): *
Status = 200 OK
{
"value": {
"id": "EXPORT_ID",
"dataTransferType": "Export",
"status": "Failed",
"fileUrl": null,
"createdAt": "2018-09-03T14:07:54.015134",
"labels": "my_custom_label",
"archived": false
},
"next": null,
"_links": {
"self": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
},
"update": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
}
}
}
* This will happen in case invalid parameter values or export type were supplied.
Get all Exports information
This call can be used to get information about all exports ever created under your account.
Endpoint URL: https://atelier.technology/api/exports
Request method: GET
Headers:
Content-Type = “application/json”
Authorization = "Bearer{{ACCESS_TOKEN}}"
Response example:
[{
"value": {
"id": "EXPORT_ID",
"dataTransferType": "Export",
"status": "ReadyForDownload",
"fileUrl": "FILE_DOWNLOAD_LINK",
"createdAt": "2018-09-03T14:07:54.015134",
"labels": null,
"archived": false
},
"next": null,
"_links": {
"self": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
},
"update": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
}
}
},
{
"value": {
"id": "EXPORT_ID",
"dataTransferType": "Export",
"status": "Pending",
"fileUrl": null,
"createdAt": "2018-09-03T14:07:54.015134",
"labels": null,
"archived": false
},
"next": null,
"_links": {
"self": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
},
"update": {
"href": "api/exports/EXPORT_ID",
"method": "GET",
"title": "",
"templated": false
}
}
}]
Update Export
For your convenience you can update Exports’ Archived boolean field and Labels text field. After update request your values can be retrieved using Get Export or Get All Exports requests.
Endpoint URL: https://atelier.technology/api/exports/EXPORT_ID
Request method: POST
Headers:
Content-Type = “application/json”
Authorization = "Bearer{{ACCESS_TOKEN}}"
Request Body:
{
"Labels": "custom_label, another label",
"Archived": true
}
Response example:
Status = 202 Accepted
{
"value": {},
"next": null,
"_links": {
"self": {
"href": "api\/exports\/36ad63dd-3bb8-4fc9-b4e3-902913346811",
"method": "GET",
"title": "",
"templated": false
},
"update": {
"href": "api\/exports\/36ad63dd-3bb8-4fc9-b4e3-902913346811",
"method": "GET",
"title": "",
"templated": false
}
}
}
⚠️ Warning:
Any exported data which is triggered by an API call will export data in UTC timezone
⚠️Handling for quote marks:
Below fields can contain Quote marks if entered by your vendors during sample creation. These are commonly used to display length of an item (Inches) in Jewellery industry.
- Description
- Supplier Code
- Stone_N_Reference
- Chain_N_Extra_Details
During CSV export, if a field value contains quote marks as enclosed value, these would be wrapped up in double quotes in CSV output. e.g. if Input value = b"bb output value = "b""bb" . This is the way CSV handles enclosed quote marks.
If you need to remove wrapped up quotes, please update setting in the plugin or code used to convert CSV file (derived via API call) as this is where this standard parsing should be executed.