235 lines
7.1 KiB
YAML
235 lines
7.1 KiB
YAML
delete:
|
|
operationId: DeletePriceListsPriceList
|
|
summary: Delete a Price List
|
|
description: Deletes a Price List
|
|
x-authenticated: true
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
description: The ID of the Price List to delete.
|
|
schema:
|
|
type: string
|
|
x-codeSamples:
|
|
- lang: JavaScript
|
|
label: JS Client
|
|
source:
|
|
$ref: ../code_samples/JavaScript/price-lists_{id}/deleteundefined
|
|
- lang: Shell
|
|
label: cURL
|
|
source:
|
|
$ref: ../code_samples/Shell/price-lists_{id}/deleteundefined
|
|
security:
|
|
- api_token: []
|
|
- cookie_auth: []
|
|
tags:
|
|
- Price List
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: The ID of the deleted Price List.
|
|
object:
|
|
type: string
|
|
description: The type of the object that was deleted.
|
|
default: price-list
|
|
deleted:
|
|
type: boolean
|
|
description: Whether or not the items were deleted.
|
|
default: true
|
|
'400':
|
|
$ref: ../components/responses/400_error.yaml
|
|
'401':
|
|
$ref: ../components/responses/unauthorized.yaml
|
|
'404':
|
|
$ref: ../components/responses/not_found_error.yaml
|
|
'409':
|
|
$ref: ../components/responses/invalid_state_error.yaml
|
|
'422':
|
|
$ref: ../components/responses/invalid_request_error.yaml
|
|
'500':
|
|
$ref: ../components/responses/500_error.yaml
|
|
get:
|
|
operationId: GetPriceListsPriceList
|
|
summary: Get a Price List
|
|
description: Retrieves a Price List.
|
|
x-authenticated: true
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
description: The ID of the Price List.
|
|
schema:
|
|
type: string
|
|
x-codeSamples:
|
|
- lang: JavaScript
|
|
label: JS Client
|
|
source:
|
|
$ref: ../code_samples/JavaScript/price-lists_{id}/getundefined
|
|
- lang: Shell
|
|
label: cURL
|
|
source:
|
|
$ref: ../code_samples/Shell/price-lists_{id}/getundefined
|
|
security:
|
|
- api_token: []
|
|
- cookie_auth: []
|
|
tags:
|
|
- Price List
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
price_list:
|
|
$ref: ../components/schemas/price_list.yaml
|
|
'400':
|
|
$ref: ../components/responses/400_error.yaml
|
|
'401':
|
|
$ref: ../components/responses/unauthorized.yaml
|
|
'404':
|
|
$ref: ../components/responses/not_found_error.yaml
|
|
'409':
|
|
$ref: ../components/responses/invalid_state_error.yaml
|
|
'422':
|
|
$ref: ../components/responses/invalid_request_error.yaml
|
|
'500':
|
|
$ref: ../components/responses/500_error.yaml
|
|
post:
|
|
operationId: PostPriceListsPriceListPriceList
|
|
summary: Update a Price List
|
|
description: Updates a Price List
|
|
x-authenticated: true
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
description: The ID of the Price List.
|
|
schema:
|
|
type: string
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
name:
|
|
description: The name of the Price List
|
|
type: string
|
|
description:
|
|
description: A description of the Price List.
|
|
type: string
|
|
starts_at:
|
|
description: The date with timezone that the Price List starts being valid.
|
|
type: string
|
|
format: date
|
|
ends_at:
|
|
description: The date with timezone that the Price List ends being valid.
|
|
type: string
|
|
format: date
|
|
type:
|
|
description: The type of the Price List.
|
|
type: string
|
|
enum:
|
|
- sale
|
|
- override
|
|
status:
|
|
description: The status of the Price List.
|
|
type: string
|
|
enum:
|
|
- active
|
|
- draft
|
|
prices:
|
|
description: The prices of the Price List.
|
|
type: array
|
|
items:
|
|
required:
|
|
- amount
|
|
- variant_id
|
|
properties:
|
|
id:
|
|
description: The ID of the price.
|
|
type: string
|
|
region_id:
|
|
description: >-
|
|
The ID of the Region for which the price is used. Only
|
|
required if currecny_code is not provided.
|
|
type: string
|
|
currency_code:
|
|
description: >-
|
|
The 3 character ISO currency code for which the price will
|
|
be used. Only required if region_id is not provided.
|
|
type: string
|
|
externalDocs:
|
|
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
|
description: See a list of codes.
|
|
variant_id:
|
|
description: The ID of the Variant for which the price is used.
|
|
type: string
|
|
amount:
|
|
description: The amount to charge for the Product Variant.
|
|
type: integer
|
|
min_quantity:
|
|
description: The minimum quantity for which the price will be used.
|
|
type: integer
|
|
max_quantity:
|
|
description: The maximum quantity for which the price will be used.
|
|
type: integer
|
|
customer_groups:
|
|
type: array
|
|
description: A list of customer groups that the Price List applies to.
|
|
items:
|
|
required:
|
|
- id
|
|
properties:
|
|
id:
|
|
description: The ID of a customer group
|
|
type: string
|
|
includes_tax:
|
|
description: '[EXPERIMENTAL] Tax included in prices of price list'
|
|
type: boolean
|
|
x-codeSamples:
|
|
- lang: JavaScript
|
|
label: JS Client
|
|
source:
|
|
$ref: ../code_samples/JavaScript/price-lists_{id}/postundefined
|
|
- lang: Shell
|
|
label: cURL
|
|
source:
|
|
$ref: ../code_samples/Shell/price-lists_{id}/postundefined
|
|
security:
|
|
- api_token: []
|
|
- cookie_auth: []
|
|
tags:
|
|
- Price List
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
price_list:
|
|
$ref: ../components/schemas/price_list.yaml
|
|
'400':
|
|
$ref: ../components/responses/400_error.yaml
|
|
'401':
|
|
$ref: ../components/responses/unauthorized.yaml
|
|
'404':
|
|
$ref: ../components/responses/not_found_error.yaml
|
|
'409':
|
|
$ref: ../components/responses/invalid_state_error.yaml
|
|
'422':
|
|
$ref: ../components/responses/invalid_request_error.yaml
|
|
'500':
|
|
$ref: ../components/responses/500_error.yaml
|