{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"993bbf68-6131-4555-bf20-beb65bff518e","name":"Antigro - Partner API","description":"Be sure to click over to the down arrow (if it appears next to the Example Request name) to see other versions of Example Request.\n\n<img src=\"https://antigro-designer-api-doc.s3.eu-central-1.amazonaws.com/postman-requests.png\">\n\n#### Basic flow\n\n- you send POST request,\n    \n- you redirect user from your website to our designer at url: {{SERVICE_URL}}/en?clientDesignId={id} (parametr id comes from the response to the POST request),\n    \n- the user creates the project in our designer and accepts it when it is ready,\n    \n- we redirect user to your website url that was specified in the returnUrl parameter of the POST request,\n    \n- you can confirm that the project has the ACCEPTED status by sending a GET request (no changes can be made to the project at this stage),\n    \n- if there is such a need, the user can re-enter the designer to make changes to the project, if you send a PATCH request, which will set the status again to the NEW value (this is an optional step),\n    \n- the user makes a payment on your website,\n    \n- you send PATCH request, which will set the status to the PAID value,\n    \n- the process of generating a file for printing begins on our side,\n    \n- you can confirm that the process of generating a file for printing has started by sending a GET request (in response, the printFileGenerationStatus field will contain the IN_PROGRESS value),\n    \n- you periodically send GET requests until the printFileGenerationStatus field value does not change to the COMPLETED value (in this case the printFiles field will contain the address of the print file that you can download).\n    \n\n|  | test env | prod env |\n| --- | --- | --- |\n| SERVICE_URL | [https://designer-test.antigro.com](https://designer-test.antigro.com) | [https://designer.antigro.com](https://designer.antigro.com) |\n\n**Note:** for the sake of simplicity, we are talking about one project here, but many projects can be created within the created ClientDesign object.\n\n**Note:** for security reasons, all requests to the API partner should be made from the backend service (not from the browser through which the user accesses the designer).\n\n#### Authorization\n\nAuthorization takes place using the bearer token (PARTNER_TOKEN) - to be authorized you have to create JWT token with _issuedAt_ claim (signed with HMAC SHA-256 algorithm using the secret provided by us) and put it into _Authorization_ header.\n\n##### Example\n\nFor token issued at **January 31, 2022 1:00:00 PM (GMT)** with secret **J9fhGMhbslzliuIVg+sUmuG9x+95AXaLMYCt7pCf4vE=** (base64 encoded value) authorization header will be:\n\n**Bearer eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NDM2MzQwMDB9.EFkMmHqFyO3iecGSrDvNOdi8LctWrjAagY_vEot32oo**\n\n**Note:** expiration time of token in seconds is defined on the server side (it can be different depending on the environment - right now on both environments this value is 600)\n\n**Note:** Below is sample code in PHP that generates a token using the sample secret (be aware that time stamp is fixed in this code):\n\n``` php\n  function base64UrlEncode ($text) {\n      return str_replace(['+', '/', '='], ['-', '_', ''], base64_encode($text));\n  }\n  function generateJWT () {\n    $signing_key = base64_decode('J9fhGMhbslzliuIVg+sUmuG9x+95AXaLMYCt7pCf4vE=');\n    $header = json_encode(['alg' => 'HS256']);\n    $payload = json_encode(['iat' => 1643634000]);\n    $base64UrlHeader = base64UrlEncode($header);\n    $base64UrlPayload = base64UrlEncode($payload);\n    // Create Signature Hash\n    $signature = hash_hmac('sha256', $base64UrlHeader . \".\" . $base64UrlPayload, $signing_key, true);\n    $base64Signature = base64UrlEncode($signature);\n    $jwt = $base64UrlHeader . \".\" . $base64UrlPayload . \".\" . $base64Signature;\n    return $jwt;\n}\n  echo generateJWT();\n?>\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"1264609","team":27228,"collectionId":"993bbf68-6131-4555-bf20-beb65bff518e","publishedId":"UVXjJvn3","public":true,"publicUrl":"https://documenter-api.postman.tech/view/1264609/UVXjJvn3","privateUrl":"https://go.postman.co/documentation/1264609-993bbf68-6131-4555-bf20-beb65bff518e","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-single-column","customisation":null,"version":"8.12.14","publishDate":"2022-01-14T15:17:47.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"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://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/t_team_logo_pubdoc/v1/team/3ff28a94dcfd5f95821f91ab8d3a544bcbb06b52749a4fb86b57f337f9c510ea","favicon":""},"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://documenter.gw.postman.com/view/metadata/UVXjJvn3"}