commercetools / commercetools-postman-collection

Collection of commercetools API examples setup on top of Postman
117 stars 172 forks source link

Inconsistencies in collections for Project variable #19

Closed Tjmstudios closed 8 months ago

Tjmstudios commented 1 year ago

Small inconsistencies that lead to the API request not automatically work after importing the collections into postman

API collection https://github.com/commercetools/commercetools-postman-collection/blob/master/api/collection.json The project key variable is {{project-key}}

Postman environment template collection https://github.com/commercetools/commercetools-postman-collection/blob/master/api/template.json There is no project key variable here.

Composable Commerce Merchant center Postman environment template (example values) { "id": "a02325d4-10f7-4e29-a942-ffe145dg2d60", "name": "hello-world-playground", "values": [ { "key": "host", "value": "https://api.australia-southeast1.gcp.commercetools.com", "enabled": true, "type": "text" }, { "key": "auth_url", "value": "https://auth.australia-southeast1.gcp.commercetools.com", "enabled": true, "type": "text" }, { "key": "projectKey", "value": "hello-world", "enabled": true, "type": "text" }, { "key": "client_id", "value": "5_j34MwUw3uSwoemfWCBeSWD", "enabled": true, "type": "text" }, { "key": "client_secret", "value": "8wxtSn6nGwCrjcB4GkIgMjHGCEpSU1ZP", "enabled": true, "type": "text" } ], "_postman_variable_scope": "environment", "_postman_exported_at": "2023-08-08T00:24:05.049Z", "_postman_exported_using": "Postman/6.0.10" }

The variable is projectKey and not project-key, leading to a miss match.

jenschude commented 1 year ago

The project key is retrieved from the authentication endpoint once you request a token.

jenschude commented 1 year ago

I will ping the respective team from the Merchant center to change the template file

Hegi commented 8 months ago

@jenschude I reported this as https://commercetools.atlassian.net/servicedesk/customer/portal/22/SUPPORT-23680 It's already fixed. @Tjmstudios it seems like going through support tickets yields results faster. :)

jenschude commented 8 months ago

Cool. 👍 I will close the issue :)