Implemented the GET /marketplace/orders endpoint for the Open API specification document in the library target.
This commit is contained in:
@@ -2011,6 +2011,59 @@ paths:
|
|||||||
$ref: '#/components/responses/NotAccessable'
|
$ref: '#/components/responses/NotAccessable'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalError'
|
$ref: '#/components/responses/InternalError'
|
||||||
|
/marketplace/orders:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Marketplace
|
||||||
|
summary: Get a list of order for a seller in a marketplace.
|
||||||
|
description: |
|
||||||
|
Returns a list orders for a seller in a marketplace.
|
||||||
|
|
||||||
|
This endpoints accepts pagination and authentication as a seller.
|
||||||
|
operationId: getOrders
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/OrderStatus'
|
||||||
|
- $ref: '#/components/parameters/OrderCreatedAfter'
|
||||||
|
- $ref: '#/components/parameters/OrderCreatedBefore'
|
||||||
|
- $ref: '#/components/parameters/OrderArchived'
|
||||||
|
- $ref: '#/components/parameters/SortOrderField'
|
||||||
|
- $ref: '#/components/parameters/SortOrder'
|
||||||
|
- $ref: '#/components/parameters/Page'
|
||||||
|
- $ref: '#/components/parameters/PerPage'
|
||||||
|
security:
|
||||||
|
- ConsumerKeySecret: []
|
||||||
|
- UserToken: []
|
||||||
|
- OAuth: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully retrieved a list of orders for a seller in a marketplace.
|
||||||
|
headers:
|
||||||
|
Link:
|
||||||
|
$ref: '#/components/headers/Link'
|
||||||
|
X-Discogs-RateLimit:
|
||||||
|
$ref: '#/components/headers/RateLimit'
|
||||||
|
X-Discogs-RateLimit-Used:
|
||||||
|
$ref: '#/components/headers/RateLimitUsed'
|
||||||
|
X-Discogs-RateLimit-Remaining:
|
||||||
|
$ref: '#/components/headers/RateLimitRemaining'
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
description: A type that contains a list of orders for a seller in a marketplace.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
pagination:
|
||||||
|
$ref: '#/components/schemas/Pagination'
|
||||||
|
listings:
|
||||||
|
description: A list of orders for a seller in a marketplace.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Order'
|
||||||
|
required:
|
||||||
|
- listings
|
||||||
|
- pagination
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalError'
|
||||||
components:
|
components:
|
||||||
headers:
|
headers:
|
||||||
Link:
|
Link:
|
||||||
@@ -2244,6 +2297,32 @@ components:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
OrderArchived:
|
||||||
|
description: A flag that indicates whether to show orders with a specific archived status or not.
|
||||||
|
name: archived
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
OrderCreatedAfter:
|
||||||
|
description: An indication to show order created after a given ISO 8601 timestamp.
|
||||||
|
name: created_after
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
OrderCreatedBefore:
|
||||||
|
description: An indication to show order created before a given ISO 8601 timestamp.
|
||||||
|
name: created_before
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
OrderStatus:
|
||||||
|
description: An indication to show order with a given status only.
|
||||||
|
name: status
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/OrderStatus'
|
||||||
Page:
|
Page:
|
||||||
description: A number of page of results to return.
|
description: A number of page of results to return.
|
||||||
name: page
|
name: page
|
||||||
@@ -2330,6 +2409,18 @@ components:
|
|||||||
enum:
|
enum:
|
||||||
- asc
|
- asc
|
||||||
- desc
|
- desc
|
||||||
|
SortOrderField:
|
||||||
|
description: A filter by an order field.
|
||||||
|
name: sort
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- id
|
||||||
|
- buyer
|
||||||
|
- created
|
||||||
|
- status
|
||||||
|
- last_activity
|
||||||
UserAgent:
|
UserAgent:
|
||||||
name: User-Agent
|
name: User-Agent
|
||||||
description: A name of a software agent responsible for interacting with the service.
|
description: A name of a software agent responsible for interacting with the service.
|
||||||
@@ -3270,6 +3361,131 @@ components:
|
|||||||
main_release:
|
main_release:
|
||||||
description: An identifier of a main release for a master.
|
description: An identifier of a main release for a master.
|
||||||
type: integer
|
type: integer
|
||||||
|
Order:
|
||||||
|
description: A type that represents an order.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: An identifier of an order.
|
||||||
|
type: string
|
||||||
|
readOnly: true
|
||||||
|
resource_url:
|
||||||
|
description: A URI resource of an order.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
readOnly: true
|
||||||
|
messages_url:
|
||||||
|
description: A URI resource for the messages of an order.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
readOnly: true
|
||||||
|
uri:
|
||||||
|
description: A URI representation of an order.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
readOnly: true
|
||||||
|
buyer:
|
||||||
|
description: A buyer of an order.
|
||||||
|
$ref: '#/components/schemas/UserIdentity'
|
||||||
|
seller:
|
||||||
|
description: A seller of an order.
|
||||||
|
$ref: '#/components/schemas/UserIdentity'
|
||||||
|
created:
|
||||||
|
description: A date and time in which an order was created.
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
status:
|
||||||
|
description: A status of an order.
|
||||||
|
$ref: '#/components/schemas/OrderStatus'
|
||||||
|
next_status:
|
||||||
|
description: A list of upcoming statuses of an order.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/OrderStatus'
|
||||||
|
last_activity:
|
||||||
|
description: A date and time for the last update of an order.
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
items:
|
||||||
|
description: A list of items of an order.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/OrderItem'
|
||||||
|
fee:
|
||||||
|
description: A fee amount of an order.
|
||||||
|
$ref: '#/components/schemas/Price'
|
||||||
|
shipping:
|
||||||
|
description: A shipping amount of an order.
|
||||||
|
$ref: '#/components/schemas/Shipping'
|
||||||
|
total:
|
||||||
|
description: A total amount of an order.
|
||||||
|
$ref: '#/components/schemas/Price'
|
||||||
|
shipping_address:
|
||||||
|
description: A container for all the shipping details of a buyer of an order.
|
||||||
|
type: string
|
||||||
|
additional_instructions:
|
||||||
|
description: A container for any extra information about shipping of an order.
|
||||||
|
type: string
|
||||||
|
archived:
|
||||||
|
description: A flag that indicates whether an order was archived or not.
|
||||||
|
type: boolean
|
||||||
|
required:
|
||||||
|
- additional_instructions
|
||||||
|
- archived
|
||||||
|
- buyer
|
||||||
|
- created
|
||||||
|
- fee
|
||||||
|
- id
|
||||||
|
- items
|
||||||
|
- last_activity
|
||||||
|
- messages_url
|
||||||
|
- next_status
|
||||||
|
- resource_url
|
||||||
|
- seller
|
||||||
|
- shipping
|
||||||
|
- shipping_address
|
||||||
|
- status
|
||||||
|
- total
|
||||||
|
- uri
|
||||||
|
OrderItem:
|
||||||
|
description: A type that represents an item of an order.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: An identifier of an order item.
|
||||||
|
type: integer
|
||||||
|
minimum: 0
|
||||||
|
readOnly: true
|
||||||
|
price:
|
||||||
|
description: A price of an order item.
|
||||||
|
$ref: '#/components/schemas/Price'
|
||||||
|
release:
|
||||||
|
description: A type that represents a release in an order.
|
||||||
|
$ref: '#/components/schemas/ReleaseInListing'
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- price
|
||||||
|
- release
|
||||||
|
OrderStatus:
|
||||||
|
description: A type that represents a status of an order.
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- All
|
||||||
|
- New Order
|
||||||
|
- Buyer Contacted
|
||||||
|
- Invoice Sent
|
||||||
|
- Payment Pending
|
||||||
|
- Payment Received
|
||||||
|
- In Progress
|
||||||
|
- Shippied
|
||||||
|
- Merged
|
||||||
|
- Order Changed
|
||||||
|
- Refund Sent
|
||||||
|
- Cancelled
|
||||||
|
- Cancelled (Non-Paying Buyer)
|
||||||
|
- Cancelled (Item Unavailable)
|
||||||
|
- Cancelled (Per Buyer's Request)
|
||||||
|
- Cancelled (Refund Received)
|
||||||
Pagination:
|
Pagination:
|
||||||
description: A type that provides details about a paginated result.
|
description: A type that provides details about a paginated result.
|
||||||
type: object
|
type: object
|
||||||
@@ -4008,6 +4224,21 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- message
|
- message
|
||||||
|
Shipping:
|
||||||
|
description: A type that represents a shipping costs.
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Price'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
currency:
|
||||||
|
description: A currency chosen by a buyer.
|
||||||
|
method:
|
||||||
|
description: A shipping method chosen by a buyer.
|
||||||
|
type: string
|
||||||
|
value:
|
||||||
|
description: A shipping value to be paid by a buyer.
|
||||||
|
required:
|
||||||
|
- method
|
||||||
Track:
|
Track:
|
||||||
description: A type that represents a track.
|
description: A type that represents a track.
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
Reference in New Issue
Block a user