Let's replace all the %1 and %2 in the resources.yaml with URI Templates, that have the resource type.
e.g.
get-collection:
docs: "https://documentation.elasticpath.com/commerce-cloud/docs/api/promotions/get-promotion-codes.html"
url: "/v2/promotions/%1/codes"
get-entity:
docs: "https://documentation.elasticpath.com/commerce-cloud/docs/api/promotions/get-promotion-codes.html"
url: "/v2/promotions/%1/codes"
delete-entity:
docs: "https://documentation.elasticpath.com/commerce-cloud/docs/api/promotions/delete-promotion-codes.html"
url: "/v2/promotions/%1/codes/%2"
create-entity:
docs: "https://documentation.elasticpath.com/commerce-cloud/docs/api/promotions/create-promotion-codes.html"
url: "/v2/promotions/%1/codes"
to
get-collection:
docs: "https://documentation.elasticpath.com/commerce-cloud/docs/api/promotions/get-promotion-codes.html"
url: "/v2/promotions/{promotions}/codes"
get-entity:
docs: "https://documentation.elasticpath.com/commerce-cloud/docs/api/promotions/get-promotion-codes.html"
url: "/v2/promotions/{promotions}/codes"
delete-entity:
docs: "https://documentation.elasticpath.com/commerce-cloud/docs/api/promotions/delete-promotion-codes.html"
url: "/v2/promotions/{promotions}/codes/{promotions_codes}"
create-entity:
docs: "https://documentation.elasticpath.com/commerce-cloud/docs/api/promotions/create-promotion-codes.html"
url: "/v2/promotions/{promotions}/codes"
Importantly the name of the parameter MUST be one of the keys in the resource.yaml.
Let's replace all the %1 and %2 in the resources.yaml with URI Templates, that have the resource type.
e.g.
to
Importantly the name of the parameter MUST be one of the keys in the resource.yaml.