{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"0cf1efd4-03a8-4085-b73e-84c867e370fe","name":"TextileGenesis API documentation for developers","description":"## **Recent Updates**\n\n---\n\n---\n\n### _**MAY release:**_\n\n- Site group ID in trace data and My Network API response\n    \n\n---\n\n---\n\n## The need for an Application Programming Interface (API)\n\nPO-related data required for initiating the traceability process is straightforward and easily available from the brands’ data systems, getting the data in the format required by the TextileGenesis™ platform can become cumbersome, especially if the number of POs being traced is high.  \nCurrently, the TextileGenesis™ system allows the data to be collated in four different ways:\n\n1. Direct Web Interface\n    \n2. Excel upload through the web\n    \n3. Secure File Transfer Protocol (SFTP)\n    \n4. Application Programming Interface (API)\n    \n\nThe first two methods are recommended for pilots and small scaling programs. However, for large scaling programs and rollouts, an automated method would be required. The SFTP method has been used successfully by some brands, but for full-scale rollouts, the API would be the preferred method.\n\nTextileGenesis™ has already tested the API with selected brands. However, they were done through a customized API process, which requires high levels of resource investment from both the brand and TextileGenesis™. To achieve sustainability on a scale, an easy-to-use API plug-in would be necessary.\n\n<img src=\"https://content.pstmn.io/18844bc3-b1b9-48e3-ba0d-282409525155/bG9nby5wbmc=\" width=\"292\" height=\"63\">\n\n##### TextileGenesis™ presently provides APIs in two distinct categories: _**data fetch**_ and _**data share**_. The data fetch APIs, hosted by TextileGenesis, enable brands to retrieve purchase order (PO) details or execute CRUD operations on POs. On the other hand, brands develop data share APIs to consume data disseminated by TG, essentially subscribing to receive notifications about PO updates or to access traceability data (FTR). Please refer to the side navigation for more information on these APIs.\n\n## How to enable TG API integration?\n\n**Steps to Activate TG API Integration**\n\n1. Sign up on the TG platform to establish an account.\n    \n2. Upon approval of your registration by the TG Customer Engagement team, log into your TG account.\n    \n3. Navigate to the “Company Profile” -> “API Integration” tab located at the top of the page.\n    \n4. Submit a request to activate API integration.\n    \n5. Once TG approves your API integration request, an email containing all necessary details to retrieve the authorization token will be dispatched to the company admin email.\n    \n6. Utilize these credentials to employ the ‘Fetch Authorization Token’ API as outlined in the documentation.\n    \n\n**Note:** _The API credentials vary across different environments. When we enable API integration for a specific environment, the registered company admin will receive an email containing API credentials. These credentials will be functional exclusively within that particular environment._\n\n## Prerequisites for enabling API integration\n\n- Establish an account in the TG integration test environment to evaluate the API integration, adhering to the steps outlined above. TG will provide the brand with a set of test cases.\n    \n\nRegister your company in TG integration test environment - [https://integrationtest.textilegenesis.com/](https://integrationtest.textilegenesis.com/)\n\nBase URL for Integration test environment APIs - [https://testintegration-api.textilegenesis.com/v2/api/](https://testintegration-api.textilegenesis.com/v2/api/)\n\nAuth token for API (Integration test env)- [https://accounts.integrationtest.textilegenesis.com/oauth/token](https://accounts.integrationtest.textilegenesis.com/oauth/token)\n\n- The brand is required to execute these tests, and upon successful completion, the API integration will be activated in the Live/Production environment.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"31505351","team":5854873,"collectionId":"0cf1efd4-03a8-4085-b73e-84c867e370fe","publishedId":"2s9YeHbrhF","public":true,"publicUrl":"https://developer.textilegenesis.com","privateUrl":"https://go.postman.co/documentation/31505351-0cf1efd4-03a8-4085-b73e-84c867e370fe","customColor":{"top-bar":"00B987","right-sidebar":"000000","highlight":"00B987"},"documentationLayout":"classic-single-column","customisation":{"metaTags":[{"name":"description","value":"Documentation of APIs offered by TextileGenesis for developers and system integrations. "},{"name":"title","value":"TextileGenesis API documentation"}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":"https://content.pstmn.io/6f2ce482-a878-4c97-9fa7-8ae8d4556f66/TWljcm9zb2Z0VGVhbXMtaW1hZ2UgKDIpLnBuZw==","colors":{"top-bar":"00B987","right-sidebar":"000000","highlight":"00B987"}},{"name":"light","logo":"https://content.pstmn.io/6f2ce482-a878-4c97-9fa7-8ae8d4556f66/TWljcm9zb2Z0VGVhbXMtaW1hZ2UgKDIpLnBuZw==","colors":{"top-bar":"00B987","right-sidebar":"000000","highlight":"00B987"}}]}},"version":"8.11.2","publishDate":"2023-12-07T10:36:11.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"TextileGenesis API documentation","description":"Documentation of APIs offered by TextileGenesis for developers and system integrations. "},"logos":{"logoLight":"https://content.pstmn.io/6f2ce482-a878-4c97-9fa7-8ae8d4556f66/TWljcm9zb2Z0VGVhbXMtaW1hZ2UgKDIpLnBuZw==","logoDark":"https://content.pstmn.io/6f2ce482-a878-4c97-9fa7-8ae8d4556f66/TWljcm9zb2Z0VGVhbXMtaW1hZ2UgKDIpLnBuZw=="}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/b3ab137c0ad615fd5f2a0188969bbaa1b0346d6f546d07c76c976ef068be53a3","favicon":"https://textilegenesis.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://developer.textilegenesis.com/view/metadata/2s9YeHbrhF"}