Implemented the POST /marketplace/orders/{order_id}/messages endpoint for the Open API specification document in the library target.

This commit is contained in:
2025-11-10 00:03:47 +01:00
parent 93094d1d2b
commit 3909f8c8b6
+58 -3
View File
@@ -2116,7 +2116,7 @@ paths:
description: |
Returns a list orders for a seller in a marketplace.
This endpoints accepts pagination and authentication as a seller.
This endpoints accepts pagination and requires authentication as a seller.
operationId: getOrderMessages
parameters:
- $ref: '#/components/parameters/OrderId'
@@ -2158,8 +2158,50 @@ paths:
$ref: '#/components/responses/NotAccessable'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/Unprocessable'
'500':
$ref: '#/components/responses/InternalError'
post:
tags:
- Marketplace
summary: Add a message to an order.
description: |
Adds a new message to the orders message log.
When posting a new message, it is also possible to update the order status. In this case, the message will automatically be prepended with: *Seller changed status from Old Status to New Status*
While both `message` and `status` properties are each optional, one or both must be present.
This endpoints requires authentication as a seller.
operationId: addOrderMessage
parameters:
- $ref: '#/components/parameters/OrderId'
requestBody:
$ref: '#/components/requestBodies/OrderMessage'
security:
- ConsumerKeySecret: []
- UserToken: []
- OAuth: []
responses:
'201':
description: Successfully added a new message to a list of messages related to an order.
headers:
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 message that has been added to an order.
$ref: '#/components/schemas/OrderMessage'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/NotAccessable'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
components:
@@ -2617,6 +2659,19 @@ components:
- price
- release_id
- status
OrderMessage:
description: A container to use in case to add a message to an existing order.
required: true
content:
application/json:
schema:
properties:
message:
description: A message to attach to an order.
type: string
status:
description: A update to a status of an order.
type: string
MoveInstance:
description: A container to use in case of moving a release instance from a collection folder into another.
required: false