openapi: 3.0.0 info: title: VTex Anti-fraud Provider Account Pricing Hub Prices API description: ">ℹ️ Onboarding guide\r\n>\r\n> Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Anti-fraud Provider Protocol is a set of definitions to help you integrate your anti-fraud service API into VTEX platform.\r\n\r\nTo achieve this, you need to implement a web API (REST) following the specifications described in this documentation.\r\n\r\n>⚠️ You can also access our [template on GitHub](https://github.com/vtex-apps/antifraud-provider-example) to help you quickly develop your anti-fraud connector using the Anti-fraud Provider Protocol and VTEX IO.\r\n\r\nTo learn more about the Anti-fraud Provider Protocol, check our [developer guide](https://developers.vtex.com/docs/guides/how-the-integration-protocol-between-vtex-and-antifraud-companies-works).\r\n\r\n## Anti-fraud Provider API Index\r\n\r\n### Anti-fraud Flow\r\n\r\n- `POST` [Send Anti-fraud Pre-Analysis Data (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/pre-analysis)\r\n- `POST` [Send Anti-fraud Data](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/transactions)\r\n- `PUT` [Update Anti-fraud Transactions (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#put-/transactions/-transactionId-)\r\n- `GET` [List Anti-fraud Provider Manifest](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/manifest)\r\n- `GET` [Get Anti-fraud Status](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/transactions/-transactions.id-)\r\n- `DELETE` [Stop Anti-fraud Analysis (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#delete-/transactions/-transactions.Id-)\r\n\r\n### OAuth Flow\r\n\r\n1. `POST` [Retrieve Token](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/authorization/token)\r\n2. `GET` [Redirect](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/redirect)\r\n3. `GET` [Return to VTEX](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/authorizationCode)\r\n4. `GET` [Get Credentials](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/authorization/credentials)" version: '1.0' servers: - url: https://{providerApiEndpoint} description: Anti-fraud provider endpoint URL. variables: providerApiEndpoint: description: Anti-fraud provider endpoint URL. default: '{providerApiEndpoint}' tags: - name: Pricing Hub Prices paths: /api/pricing-hub/prices: post: tags: - Pricing Hub Prices summary: VTex Retrieve prices description: "This route retrieves and applies prices for the items that are passed in the request. Pricing Hub will select the pricing method that will be used for each item and will fetch their respective price from the selected pricing method. \r\n\r\n>ℹ️ This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). " parameters: - name: an in: query required: true description: Name of the VTEX account. Used as part of the URL. schema: type: string example: apiexamples - name: Accept in: header required: true description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. style: simple schema: type: string default: application/json - name: Content-Type in: header description: Describes the type of the content being sent. required: true style: simple schema: type: string default: application/json requestBody: content: application/json: schema: $ref: '#/components/schemas/GetPricesRequestObject' example: items: - index: 0 skuId: '13' quantity: 1 brandId: '2000000' sellerId: '1' priceTableIds: [] categoriesIds: - '1' UtmSource: facebook UtmMedium: social UtmCampaign: summer UtmInternalCampaign: sale salesChannel: '1' email: customer@email.com required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/response2' example: items: - index: 0 skuId: '14' price: 1875 costPrice: 750 listPrice: 2500 priceTable: '1' priceValidUntil: '2022-03-24T14:57:19Z' - index: 0 skuId: '14' price: 200 costPrice: 200 listPrice: 200 priceTable: '1' priceValidUntil: '2022-03-04T20:00:18Z' deprecated: false /api/pricing-hub/prices/config: put: tags: - Pricing Hub Prices summary: VTex Configure external price source description: "This route facilitates setting up an external price source in Pricing Hub. It also allows you to activate or deactivate that source in a given account. \r\n\r\n>ℹ️ This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). " operationId: ConfigExternalPriceSource parameters: - name: an in: query description: Name of the VTEX account. required: false schema: type: string example: apiexamples - name: Accept in: header required: true description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. style: simple schema: type: string default: application/json - name: Content-Type in: header description: Describes the type of the content being sent. required: true style: simple schema: type: string default: application/json requestBody: content: application/json: schema: $ref: '#/components/schemas/ConfigExternalPriceSourceRequest' example: active: true appName: apiexamples_app_name required: true responses: '200': description: OK components: schemas: items: required: - itemsObject type: array description: List of items to be priced by Pricing Hub. items: type: object description: Each item to be priced by Pricing Hub. required: - index - skuId - quantity - brandId - sellerId - priceTableIds - categoriesIds properties: index: description: Index of the item at Checkout's cart. It has to be unique in the items array. type: integer example: 0 skuId: description: ID of the SKU that will be priced. type: string example: '13' quantity: description: This is the amount of items that will be priced. It is possible to have a volume discount for many repeated items. Hence, the price may not be the quantity of the item multiplied by the unitary price. type: integer example: 1 brandId: description: Brand ID for the item. type: string example: '2000000' sellerId: description: Seller ID for the item. type: string example: '1' priceTableIds: description: IDs of the price tables that will be used to compute the price. More than one price table might be passed to the array. The final price rule might be more complex than the lowest or the highest price. type: array items: type: string example: '1' description: ID of a price table that will be used to compute the price. default: - '1' categoriesIds: description: ID of the categories that will be used to compute the price. type: array items: type: string example: '1' description: ID of a category that will be used to compute the price. default: - '1' ConfigExternalPriceSourceRequest: required: - appName type: object properties: active: type: boolean example: false description: Defines if the external price source is active (`true`) or not (`false`). If not set, the default value will be `false`. appName: type: string description: Name of the app that communicates with the external pricing source. example: apiexamples_app_name response2: required: - items type: object properties: items: type: array items: $ref: '#/components/schemas/Item1' description: List of items and their respective prices applied by Pricing Hub. GetPricesRequestObject: required: - items - salesChannel - email type: object properties: items: $ref: '#/components/schemas/items' UtmSource: type: string example: facebook description: Traffic source, which indicates where the traffic originated from according to the `utm_source` value in the URL that led to the order. If there is no value, use `null`. nullable: true UtmMedium: type: string example: social description: Medium that indicates what type of traffic the customer originated from, represented by the `utm_medium` value in the URL that led to the order. If there is no value, use `null`. nullable: true UtmCampaign: type: string example: summer description: Campaign name, represented by the `utm_campaign` value in the URL that led to the order. If there is no value, use `null`. UtmInternalCampaign: type: string example: sale description: Internal campaign name, represented by the `utmi_cp` value in the URL that led to the order. If there is no value, use `null`. nullable: true salesChannel: type: string example: '1' description: Represents Checkout's sales channel. email: type: string example: customer@email.com description: Customer's email address. If there is no value, use an empty string. Item1: required: - index - skuId - price - costPrice - listPrice - priceTable - priceValidUntil type: object description: Each price item. properties: index: type: integer description: The same index referring to Checkout's cart that was passed to the API. skuId: type: string description: The same skuId that was passed to the API. price: type: number description: The price returned by the pricing API that was used by Pricing Hub. It is measured in cents, so 5000 means 50,00 in local currency. costPrice: type: number description: The cost price returned by the pricing API that was used by Pricing Hub. It is measured in cents, so 5000 means 50,00 in local currency. listPrice: type: number description: The list price returned by the pricing API that was used by Pricing Hub. It is measured in cents, so 5000 means 50,00 in local currency. priceTable: type: string description: The price table that was used to price the item. priceValidUntil: type: string description: The moment up until the price is valid. After that moment, it will be necessary to call the pricing API again. The format of the string is in RFC3339. securitySchemes: VtexIdclientAutCookie: type: apiKey in: header name: VtexIdclientAutCookie description: '[User token](https://developers.vtex.com/docs/guides/api-authentication-using-user-tokens), valid for 24 hours.'