@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Pricing Hub (DEPRECATED)
@base https://prchub.vtexcommercestable.com.br
@version 1.0
@auth ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header
@endpoints 2
@toc api(2)

@endpoint POST /api/pricing-hub/prices
@desc Retrieve prices
@required {an: str # Name of the VTEX account. Used as part of the URL., Accept: str=application/json # HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand., Content-Type: str=application/json # Describes the type of the content being sent., items: [map{index!: int, skuId!: str, quantity!: int, brandId!: str, sellerId!: str, priceTableIds!: [str], categoriesIds!: [str]}] # List of items to be priced by Pricing Hub., salesChannel: str # Represents Checkout's sales channel., email: str # Customer's email address. If there is no value, use an empty string.}
@optional {UtmSource: str # 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`., UtmMedium: str # 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`., UtmCampaign: str # Campaign name, represented by the `utm_campaign` value in the URL that led to the order. If there is no value, use `null`., UtmInternalCampaign: str # Internal campaign name, represented by the `utmi_cp` value in the URL that led to the order. If there is no value, use `null`.}
@returns(200) {items: [map]} # OK
@example_request {"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"}

@endpoint PUT /api/pricing-hub/prices/config
@desc Configure external price source
@required {Accept: str=application/json # HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand., Content-Type: str=application/json # Describes the type of the content being sent., appName: str # Name of the app that communicates with the external pricing source.}
@optional {an: str # Name of the VTEX account., active: bool # Defines if the external price source is active (`true`) or not (`false`). If not set, the default value will be `false`.}
@returns(200) OK
@example_request {"active":true,"appName":"apiexamples_app_name"}

@end
