Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDU-14427-new-pick-pack-api #1391

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

karenkrieger
Copy link
Contributor

@karenkrieger karenkrieger commented Mar 11, 2025

Types of changes

  • New content (endpoints, descriptions or fields from scratch)
  • Improvement (make an endpoint's title or description even better)
  • Spelling and grammar accuracy (self-explanatory)

Changelog

Do not forget to update your changes to our Developer Portal's changelog. Did you create a release note?

  • Yes, I already created a release note about this change.
  • No, but I am going to.

@karenkrieger karenkrieger added the documentation Improvements or additions to documentation label Mar 11, 2025
@karenkrieger karenkrieger self-assigned this Mar 11, 2025
@karenkrieger karenkrieger requested a review from a team March 11, 2025 20:25
Copy link

Thanks for your contribution. The .json file will be checked now with Spectral.

@karenkrieger karenkrieger marked this pull request as ready for review March 11, 2025 20:55
"Authentication"
],
"summary": "Create JWT token",
"description": "Creates a `JWT` (JSON Web Token) necessary to access the Pick and Pack Last Mile Protocol API information.\r\n\r\n>ℹ️ To generate the `JWT` it is necessary to have the `API KEY` previously generated by the Pick and Pack team.\r\n\r\n## Permissions\r\n\r\nThis endpoint does not require [permissions](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3).",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include token expiration time.

"variables": {
"environment": {
"default": "DefaultParameterValue",
"description": "Server to access the authentication necessary to make a request in the Pick and Pack Provider API."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this description is wrong. Please double check it.

"url": "https://auth.pickingnpacking.com/prod/{environment}",
"variables": {
"environment": {
"default": "DefaultParameterValue",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too generic. I think even something like "environment" would be better. But maybe the team can provide something more specific/realist, like we have "vtexcommercestable" for core commercer APIs. Did you check it with them?

"url": "https://api.pick-and-pack.com/prod/v1/{environment}",
"variables": {
"environment": {
"default": "DefaultParameterValue",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too generic. I think even something like "environment" would be better. But maybe the team can provide something more specific/realist, like we have "vtexcommercestable" for core commercer APIs. Did you check it with them?

"Orders"
],
"summary": "Get order by ID",
"description": "Retrieves order details by its ID.\n\n>ℹ️ The response is cached for 30 seconds based on the `orderId` parameter. The endpoint supports up to 30 requests per second, with a maximum of 100 concurrent requests.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| OMS | OMS access | **View order** |\r\n| OMS | OMS access | **Only show orders created by the user (via call center)** |\r\n| Catalog | Telesales | **Assisted Sales** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are aplicable predefined roles. Please fix the text, including the apropriate predefined roles.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies to all endpoints except /token

"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreatetokenRequest"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking the PR over this, but I don't think it is a good practice to use ref for a component that is used only once in the file. It usually makes maintenance more difficult.

"Orders"
],
"summary": "Set order delivery",
"description": "This endpoint finalizes the Pick and Pack workflow by marking the order as delivered. Additionally, it allows you to update the OMS with shipping details. All fields are optional. For more information, see [Update order tracking status](https://developers.vtex.com/docs/api-reference/orders-api#put-/api/oms/pvt/orders/-orderId-/invoice/-invoiceNumber-/tracking) endpoint.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| OMS | OMS access | **View order** |\r\n| OMS | OMS access | **Only show orders created by the user (via call center)** |\r\n| Catalog | Telesales | **Assisted Sales** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are aplicable predefined roles. Please fix the text, including the apropriate predefined roles.

In fact, it sounds very strange to me the resources View order and Only show orders created by the user (via call center) would allow the user to edit order information. Do you think it is worth double checking with the team?

},
"events": {
"type": "array",
"description": "List of events that occurred during the delivery process.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this description. What kind of events occur during delivery?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it just a list of deliveries? Meaning that orders with split packages (different sellers, etc) have multiple delivery events? Would this apply for pnp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants