Open Apparel Registry (OAR) API

The Open Apparel Registry API is a service that provides name and address information on all apparel facilities worldwide, searchable on an interactive map. You can search the map by facility name, contributor and country. Data is available in JSON format.

Sample request and response

1. Get all contributors

Description

You can request a list of all contributors on OAR platform.

API call

https://ursa.sourcemap.com/allsource

You can test this by entering the URL into your web browser. The response includes a list of the all contributors on OAR platform.

Sample response in JSON

Sample response in JSON.png

2. Search facilities by name, contributor, and country

Description

You can search facilities by name, contributor and country. The API will return a list of matched facilities in JSON format.

API call

https://ursa.sourcemap.com/searchFactoryNameCountry?name={NAME}&country={COUNTRY}&contributor=CONTRIBUTOR_ID}

Parameters

  • name (optional):

name of the facility that you would like to search

  • country (optional):

country codes divided by comma, ISO 3166 country codes (you can find a list of country codes at the end of this document)

  • contributor (optional):

  • contributor ids divided by comma (you can find each contributor “_id” from the previous /allsource API call)

Examples of API calls

https://ursa.sourcemap.com/searchFactoryNameCountry?name=sunshine&country=US&contributor=5b8070b3d8ca1d7c1d5168b4

You can test this by entering the URL into your web browser. The response includes a list of facilities.

Sample response in JSON

Sample response in JSON 2.png

3. Upload a list of facilities to your OAR account

Description

You can upload a CSV file to your OAR account. The CSV file you upload should have “country”, “name”, “address” (all lowercase) as its column titles. The CSV file should be smaller than 5 MB. The API will return a message if the POST request is successful and a new list will appear on your “My List” page.

Note: in order to make this POST request, you need to register for an account on the OAR platform, if you don’t already have one.

API call

Parameters

  • UID (required):

After logging into your OAR account, you can find your UID in your Profile page url:

/profile/YOUR_UID. (e.g. profile/aIRD3whoAgQY7KyWDEpuvVsav1G2)

  • YOUR_API_KEY (required):

Go to your profile page, click on the “Generate API Key” button to get your API key

Request body

file: String (Stringified the CSV file)

  • file_name: the name of the list. It cannot contain any special characters, can only have a-z, A-Z, 0-9.

  • file_description: the description of your list

  • user_name: your user name

Examples of API calls

POST:

You can test this by entering the URL into Postman. Don’t forget to update {UID} and {YOUR_API_KEY}.

Sample request body and response in Postman:

POSTMAN.png

Sample file string

"country,name,address\r\nAlbania,Malna Tex Sh.P.K.0807,\"Rruga Xhanfize Keko, Kompleksi Xhura, Kati I Trete, Tirana, Albania\"\r\nAustria,Werkstaetten0807,\"Salesianergasse 9, Vienna, Austria\"\r\nBangladesh,Actor Sporting Ltd.0807,\"Block 33-35, Dhaka EPZ, Savar, Dhaka - 1349, Bangladesh, Dhaka, Bangladesh\"\r\nBangladesh,AKH Shirts Ltd.0807,\"133-134 Hemayetpur, Savar 1340, Dhaka, Bangladesh\"\r\nBangladesh,Anowara Fashions Ltd.0807,\"BSCIC Industrial Estate, Kalurghat, Chittagong, Bangladesh\"\r\nBangladesh,Beximco Apparels Ltd.,\"Beximco Textiles Division, Beximco Industrial Park, Sarabo, Kashimpir, Gazipur, Bangladesh, Gazipur, Bangladesh\"\r\nBangladesh,Beximco Fashions Ltd.,\"FS, SFB # 2, Dhaka Export Processing Zone, Ganakbari, Savar, Dhaka-1349, Bangladesh, Dhaka, Bangladesh\"\r\nBangladesh,Brandix Casualwear Bangladesh Ltd.,\"Plot 61-71, Comilla EPZ, Comilla, Chittagong, Comilla, Bangladesh\"\r\nBangladesh,Clifton Textile & Apparels Ltd.,\"180, Baizid Bostami Road, Nasirabad I/A, Chittagong, Bangladesh, Chittagong, Bangladesh\""

If you are using javascript, you could use JSON.stringify to convert a CSV file to string.

List of country codes (ISO 3166 country codes)

["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","XK","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"]