Skip to content

Instantly share code, notes, and snippets.

@drwasho
Created September 11, 2018 02:37
Show Gist options
  • Save drwasho/70f2dc010ae8192d79b6dc1f55c33c7b to your computer and use it in GitHub Desktop.
Save drwasho/70f2dc010ae8192d79b6dc1f55c33c7b to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
version: '1.0'
title: OpenBazaar API
description: >-
The OpenBazaar networking daemon combines a forked version of IPFS, a
Bitcoin wallet, and a peer-to-peer contracting system. This JSON API is the
primary mechanism for controlling the node. It offers a RESTful api for
building user interfaces as well as a number of RPC calls. In this
documentation you'll find a full list of API calls and example usages.
# Authentication
When running on localhost (the default), the API is unauthenticated. You can
enable authentication by setting the config file as follows:
```
{
"JSON-API": {
"Authenticated": true
}
}
```
Note that on mainnet the server enables authentication automatically if the
gateway url is bound to anything other than localhost (implying open
internet access) even if the config file is set to false.
There are two ways for a client to authenticate. The default (and preferred)
is via an authentication cookie. On start up the server generates a random
cookie and saves it in the data directory as a .cookie file. You need to add
this cookie to the header of all requests. For example:
```
cookie: OpenBazaar_Auth_Cookie=2Yc7VZtG/pVKrH5Lp0mKRSEPC4xlm1dGpkbUXLehTUI
```
Alternatively, you can use basic authentication by setting a username and
password in the config file:
```
{
"JSON-API": {
"Username": "Aladdin",
"Password": "1c8bfe8f801d79745c4631d09fff36c82aa37fc4cce4fc946683d7b336b63032"
}
}
```
The password should be saved as the hex - encoded SHA - 256 hash of your
password.You can run `openbazaar-go setapicreds` to have it hash and save
the password in the config file for you.
The username and password need to be included in the request header
following [RFC 2617](https://www.ietf.org/rfc/rfc2617.txt):
```
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
```
Where the username and password are encoded as `base64encode(username + ":"
+ password)`
or included in the Url:
```
http://username:password@localhost:8080/ob/
```
# SSL
**NEVER** open the JSON API to the internet without also encrypting the
connection with SSL. Without SSL enabled your authentication information be
sent to the server in the clear allowing anyone who views your packets to
access your server and potentially steal your bitcoins. For instructions on
how to enable SSL, see
[here](https://github.com/OpenBazaar/openbazaar-go/blob/master/docs/ssl.md).
# Cross-Origin Resource Sharing
CORS is turned off by default, meaning that you will not be able to make API
calls from a browser to a running server on localhost. You can turn CORS on
for a specific domain by setting an origin in the config file as follows:
```
{
"JSON-API": {
"CORS": "https://openbazaar.org"
}
}
```
Use "*" to allow all domains. Keep in mind that running the server with CORS
enabled for all domains is a potential secrity risk as it will allow any
website you visit to make calls to your server. Authentication should be
enabled along side CORS.
host: 'localhost:4002'
basePath: /
securityDefinitions:
auth:
type: basic
x-testValue: []
x-skip-client-authentication: false
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
'/ob/blocknode/{peerId}':
post:
description: >-
Block a node from the network. Note that this subjective blocking in
that it only affects your node.
summary: Block a node
tags:
- block
operationId: ObBlocknodeByPeerIdPost
produces:
- application/json
parameters:
- name: peerId
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/blocknode/
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Block a node
x-testDescription: >-
Block a node from the network. Note that this subjective blocking in
that it only affects your node.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
delete:
description: Unblock a blocked node.
summary: Unblock a node
tags:
- block
operationId: ObBlocknodeByPeerIdDelete
produces:
- application/json
parameters:
- name: peerId
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: DELETE
uri: /ob/blocknode/
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Unblock a node
x-testDescription: Unblock a blocked node.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/chatconversations:
get:
description: API call to retrieve chat conversations
summary: Fetch chat conversations
tags:
- chat
operationId: ObChatconversationsGet
produces:
- application/json
parameters: []
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/chatconversations
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Fetch chat conversations
x-testDescription: API call to retrieve chat conversations
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/chatmessages/{peerID}':
get:
description: >-
API call to retrieve chat messages in a specific chat conversation.
General chat messages have a subject of: "".
`limit` sets the maximum number of messages that will be returned.
When `offsetId` is set to a chat message ID it will only return chat
messages in the database which were received after the message with that
ID.
summary: Fetch chat messages
tags:
- chat
operationId: ObChatmessagesByPeerIDGet
produces:
- application/json
parameters:
- name: limit
in: query
required: true
type: string
description: ''
- name: offsetId
in: query
required: true
type: string
description: ''
- name: subject
in: query
required: true
type: string
description: ''
- name: peerID
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/chatmessages/?limit=&offsetId=&subject=
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Fetch chat messages
x-testDescription: >-
API call to retrieve chat messages in a specific chat conversation.
General chat messages have a subject of: "".
`limit` sets the maximum number of messages that will be returned.
When `offsetId` is set to a chat message ID it will only return chat
messages in the database which were received after the message with
that ID.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/chatmessages:
get:
description: >-
API call to retrieve group chat messages, specifically those related to
an order.
summary: Fetch group chat messages
tags:
- chat
operationId: ObChatmessagesGet
produces:
- application/json
parameters:
- name: limit
in: query
required: true
type: string
description: ''
- name: offsetId
in: query
required: true
type: string
description: ''
- name: subject
in: query
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/chatmessages?limit=&offsetId=&subject=
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Fetch group chat messages
x-testDescription: >-
API call to retrieve group chat messages, specifically those related
to an order.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/chat:
post:
description: >-
Send a chat message in a chat conversation.
Chat messages are limited to 20,000 characters and subjects are limited
to 500 characters.
summary: Send a chat message
tags:
- chat
operationId: ObChatPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/SendAChatMessagerequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/chat
headers:
Content-Type: application/json
body: '{"subject":"","message":"","peerId":""}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Send a chat message
x-testDescription: >-
Send a chat message in a chat conversation.
Chat messages are limited to 20,000 characters and subjects are
limited to 500 characters.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/groupchat:
post:
description: >-
Send a chat message in a chat conversation.
Chat messages are limited to 20,000 characters and subjects are limited
to 500 characters.
summary: Send a group chat message
tags:
- chat
operationId: ObGroupchatPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/SendAGroupChatMessagerequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/groupchat
headers:
Content-Type: application/json
body: '{"subject":"","message":"","peerIds":[]}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Send a group chat message
x-testDescription: >-
Send a chat message in a chat conversation.
Chat messages are limited to 20,000 characters and subjects are
limited to 500 characters.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/markchatasread/{peerID}':
post:
description: 'Mark all messages in a conversation as read. '
summary: Mark chat message as read
tags:
- chat
operationId: ObMarkchatasreadByPeerIDPost
produces:
- application/json
parameters:
- name: subject
in: query
required: true
type: string
description: ''
- name: peerID
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/markchatasread/?subject=
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Mark chat message as read
x-testDescription: 'Mark all messages in a conversation as read. '
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/chatmessage/{messageId}':
delete:
description: Delete a chat message in a chat conversation
summary: Delete a chat message
tags:
- chat
operationId: ObChatmessageByMessageIdDelete
produces:
- application/json
parameters:
- name: messageId
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: DELETE
uri: /ob/chatmessage/
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Delete a chat message
x-testDescription: Delete a chat message in a chat conversation
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/chatconversation/{peerID}':
delete:
description: Delete a chat conversation
summary: Delete a chat conversation
tags:
- chat
operationId: ObChatconversationByPeerIDDelete
produces:
- application/json
parameters:
- name: peerID
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: DELETE
uri: /ob/chatconversation/
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Delete a chat conversation
x-testDescription: Delete a chat conversation
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/cases:
get:
description: Returns a list of all moderation cases that the node was involved in.
summary: Get cases history
tags:
- orders
operationId: ObCasesGet2
produces:
- application/json
parameters:
- name: limit
in: query
required: true
type: string
description: ''
- name: offsetId
in: query
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/cases?limit=&offsetId=
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get cases history
x-testDescription: >-
Returns a list of all moderation cases that the node was involved
in.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/case/{caseId}':
get:
description: >-
API call to retrieve a specific dispute resolution case that you're the
moderator for.
summary: Fetch case
tags:
- disputes
operationId: ObCaseByCaseIdGet
produces:
- application/json
parameters:
- name: caseId
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/case/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Fetch case
x-testDescription: >-
API call to retrieve a specific dispute resolution case that you're
the moderator for.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/opendispute:
post:
description: Open a dispute of a case you're involved in
summary: Open a dispute
tags:
- disputes
operationId: ObOpendisputePost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/OpenADisputerequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/opendispute
headers:
Content-Type: application/json
body: '{"orderId":"","claim":""}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Open a dispute
x-testDescription: Open a dispute of a case you're involved in
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/closedispute:
post:
description: |-
Close a dispute of a case you're involved in
`buyerPercentage` and `vendorPercentage` are integers between 0 and 100.
summary: Close a dispute
tags:
- disputes
operationId: ObClosedisputePost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/CloseADisputerequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/closedispute
headers:
Content-Type: application/json
body: >-
{"orderId":"","buyerPercentage":100,"vendorPercentage":0,"resolution":""}
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Close a dispute
x-testDescription: >-
Close a dispute of a case you're involved in
`buyerPercentage` and `vendorPercentage` are integers between 0 and
100.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/releasefunds:
post:
description: >-
Release the funds from a multisignature address for a dispute of a case
you're involved in
summary: Release funds
tags:
- disputes
operationId: ObReleasefundsPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/ReleaseFundsrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/releasefunds
headers:
Content-Type: application/json
body: '{"orderId":""}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Release funds
x-testDescription: >-
Release the funds from a multisignature address for a dispute of a
case you're involved in
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ipfs/{hash}':
get:
description: >-
This API call will query the DHT using the given hash to get a list of
peers who are seeding the file. Depending on the size of the file it
will then download it from one or more of them. The hash may be a
directory. In which case this API returns an HTML directory view. To
view the files inside the directory, you can add either add their
filename or hash to the query. For example... ```
ipfs/QmecpJrN9RJ7smyYByQdZUy5mF6aapgCfKLKRmDtycv9aG/some_image.jpg
ipfs/QmecpJrN9RJ7smyYByQdZUy5mF6aapgCfKLKRmDtycv9aG/QmamudHQGtztShX7Nc9HcczehdpGGWpFBWu2JvKWcpELxr
``` And of course nested directories are also supported, referenced
again by a name or hash. ```
ipfs/QmecpJrN9RJ7smyYByQdZUy5mF6aapgCfKLKRmDtycv9aG/my_directory/some_image.jpg
ipfs/QmecpJrN9RJ7smyYByQdZUy5mF6aapgCfKLKRmDtycv9aG/QmamudHQGtztShX7Nc9HcczehdpGGWpFBWu2JvKWcpELxr/some_image.jpg
```
summary: Fetch file from IPFS
tags:
- files
operationId: IpfsByHashGet
produces:
- application/json
parameters:
- name: hash
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ipfs/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Fetch file from IPFS
x-testDescription: >-
This API call will query the DHT using the given hash to get a list
of peers who are seeding the file. Depending on the size of the file
it will then download it from one or more of them. The hash may be a
directory. In which case this API returns an HTML directory view. To
view the files inside the directory, you can add either add their
filename or hash to the query. For example... ```
ipfs/QmecpJrN9RJ7smyYByQdZUy5mF6aapgCfKLKRmDtycv9aG/some_image.jpg
ipfs/QmecpJrN9RJ7smyYByQdZUy5mF6aapgCfKLKRmDtycv9aG/QmamudHQGtztShX7Nc9HcczehdpGGWpFBWu2JvKWcpELxr
``` And of course nested directories are also supported, referenced
again by a name or hash. ```
ipfs/QmecpJrN9RJ7smyYByQdZUy5mF6aapgCfKLKRmDtycv9aG/my_directory/some_image.jpg
ipfs/QmecpJrN9RJ7smyYByQdZUy5mF6aapgCfKLKRmDtycv9aG/QmamudHQGtztShX7Nc9HcczehdpGGWpFBWu2JvKWcpELxr/some_image.jpg
```
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ipns/{hash}/{directory}':
get:
description: >-
The IPNS protocol allows for a user to map their peer ID to an IPFS hash
in a cryptographically secure manner. When an IPNS query is made, the
server first queries the DHT to resolve the peer ID into an IPFS hash,
then proceeds to make an IPFS query given the resolved hash. For
example, suppose we have the following mapping.. ``` {peerId} = {hash}
``` Then the following API calls are equal... ```
ipfs/{hash}/some_image.jpg ipns/{peerId}/some_image.jpg ```
summary: Fetch file from IPNS
tags:
- files
operationId: IpnsByHashAndDirectoryGet
produces:
- application/json
parameters:
- name: hash
in: path
required: true
type: string
description: ''
- name: directory
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ipns//
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Fetch file from IPNS
x-testDescription: >-
The IPNS protocol allows for a user to map their peer ID to an IPFS
hash in a cryptographically secure manner. When an IPNS query is
made, the server first queries the DHT to resolve the peer ID into
an IPFS hash, then proceeds to make an IPFS query given the resolved
hash. For example, suppose we have the following mapping.. ```
{peerId} = {hash} ``` Then the following API calls are equal... ```
ipfs/{hash}/some_image.jpg ipns/{peerId}/some_image.jpg ```
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/followers:
get:
description: >-
Returns a list of peers IDs that follow you
`limit` and `offsetId` work the same as with chat messages. Not using
the `limit` option will return all the followers (or all after
`offsetId` if you're using that).
summary: Get a list of your followers
tags:
- followers/following
operationId: ObFollowersGet
produces:
- application/json
parameters:
- name: offsetId
in: query
required: true
type: string
description: ''
- name: limit
in: query
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/followers?offsetId=&limit=
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get a list of your followers
x-testDescription: >-
Returns a list of peers IDs that follow you
`limit` and `offsetId` work the same as with chat messages. Not
using the `limit` option will return all the followers (or all after
`offsetId` if you're using that).
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/following:
get:
description: >-
Returns a list of peer IDs you are following
`limit` and `offsetId` work the same as with chat messages. Not using
the `limit` option will return all the following (or all after
`offsetId` if you're using that).
summary: Get a list of following
tags:
- followers/following
operationId: ObFollowingGet
produces:
- application/json
parameters:
- name: offsetId
in: query
required: true
type: string
description: ''
- name: limit
in: query
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/following?offsetId=&limit=
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get a list of following
x-testDescription: >-
Returns a list of peer IDs you are following
`limit` and `offsetId` work the same as with chat messages. Not
using the `limit` option will return all the following (or all after
`offsetId` if you're using that).
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/isfollowing/{peerId}':
get:
description: Returns true if you're following the given peer
summary: Am I following <peer>?
tags:
- followers/following
operationId: ObIsfollowingByPeerIdGet
produces:
- application/json
parameters:
- name: peerId
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/isfollowing/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Am I following <peer>?
x-testDescription: Returns true if you're following the given peer
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/followsme/{peerId}':
get:
description: Returns true if the given peer follows you
summary: Does <peer> follow me?
tags:
- followers/following
operationId: ObFollowsmeByPeerIdGet
produces:
- application/json
parameters:
- name: peerId
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/followsme/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Does <peer> follow me?
x-testDescription: Returns true if the given peer follows you
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/followers/{peerID}':
get:
description: Get a list of followers for a node given the peer ID.
summary: Get followers (external)
tags:
- followers/following
operationId: ObFollowersByPeerIDGet
produces:
- application/json
parameters:
- name: peerID
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/followers/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get followers (external)
x-testDescription: Get a list of followers for a node given the peer ID.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/following/{peerID}':
get:
description: Get a list of nodes following a node given the peer ID.
summary: Get following (external)
tags:
- followers/following
operationId: ObFollowingByPeerIDGet
produces:
- application/json
parameters:
- name: peerID
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/following/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get following (external)
x-testDescription: Get a list of nodes following a node given the peer ID.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/follow:
post:
description: RPC call to follow another peer on the network.
summary: Follow a peer
tags:
- followers/following
operationId: ObFollowPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/FollowAPeerrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/follow
headers:
Content-Type: application/json
body: '{"id":""}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Follow a peer
x-testDescription: RPC call to follow another peer on the network.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/unfollow:
post:
description: RPC call to unfollow another peer on the network.
summary: Unfollow a peer
tags:
- followers/following
operationId: ObUnfollowPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/UnfollowAPeerrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/unfollow
headers:
Content-Type: application/json
body: '{"id":""}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Unfollow a peer
x-testDescription: RPC call to unfollow another peer on the network.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/images/{imageHash}':
get:
description: 'Get an image given its filename. Alternatively, you can use /ipfs/{hash}'
summary: Get images (self)
tags:
- images
operationId: ObImagesByImageHashGet
produces:
- application/json
parameters:
- name: imageHash
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/images/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get images (self)
x-testDescription: >-
Get an image given its filename. Alternatively, you can use
/ipfs/{hash}
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/avatar/{peerID}/{size}':
get:
description: Get the avatar image of a node according to its size.
summary: Get avatar (ob)
tags:
- images
operationId: ObAvatarByPeerIDAndSizeGet
produces:
- application/json
parameters:
- name: peerID
in: path
required: true
type: string
description: ''
- name: size
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/avatar//
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get avatar (ob)
x-testDescription: Get the avatar image of a node according to its size.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/header/{peerID}/{size}':
get:
description: Get the header image of a node according to its size.
summary: Get header (ob)
tags:
- images
operationId: ObHeaderByPeerIDAndSizeGet
produces:
- application/json
parameters:
- name: peerID
in: path
required: true
type: string
description: ''
- name: size
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/header//
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get header (ob)
x-testDescription: Get the header image of a node according to its size.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/images:
post:
description: >-
Upload one or more images. Returns the IPFS hash of each image which can
be used to fetch the image using the IPFS API call.
summary: Upload image
tags:
- images
operationId: ObImagesPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
type: array
items:
$ref: '#/definitions/UploadImagerequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/images
headers:
Content-Type: application/json
body: '[{"filename":"","image":""}]'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Upload image
x-testDescription: >-
Upload one or more images. Returns the IPFS hash of each image which
can be used to fetch the image using the IPFS API call.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/avatar:
post:
description: >-
Set the avatar image. This will also update the avatar hash in the
profile.
summary: Set the avatar
tags:
- images
operationId: ObAvatarPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/SetTheAvatarrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/avatar
headers:
Content-Type: application/json
body: '{"avatar":""}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Set the avatar
x-testDescription: >-
Set the avatar image. This will also update the avatar hash in the
profile.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/header:
post:
description: >-
Set the header image. This will also update the header hash in the
profile.
summary: Set the header
tags:
- images
operationId: ObHeaderPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/SetTheHeaderrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/header
headers:
Content-Type: application/json
body: '{"header":""}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Set the header
x-testDescription: >-
Set the header image. This will also update the header hash in the
profile.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/inventory:
get:
description: Get a list of all inventory counts
summary: Get all inventory
tags:
- inventory
operationId: ObInventoryGet
produces:
- application/json
parameters: []
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/inventory
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get all inventory
x-testDescription: Get a list of all inventory counts
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
post:
description: >-
Set the inventory for a given item. The item format must be
/slug/variant/...
summary: Set inventory levels
tags:
- inventory
operationId: ObInventoryPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/SetInventoryLevelsrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/inventory
headers:
Content-Type: application/json
body: '{"slug":"","quantity":0}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Set inventory levels
x-testDescription: >-
Set the inventory for a given item. The item format must be
/slug/variant/...
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/listings:
get:
description: Returns an array of node's own listings.
summary: Get an array of own listings
tags:
- listings
operationId: ObListingsGet
produces:
- application/json
parameters: []
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/listings
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get an array of own listings
x-testDescription: Returns an array of node's own listings.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/listings/{peerId}':
get:
description: This returns an array of listings from an external node.
summary: Get an array of external listings
tags:
- listings
operationId: ObListingsByPeerIdGet
produces:
- application/json
parameters:
- name: peerId
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/listings/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get an array of external listings
x-testDescription: This returns an array of listings from an external node.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/listing/{slug}':
get:
description: Returns a specific listing with the inventory attached to the return.
summary: Get own listing
tags:
- listings
operationId: ObListingBySlugGet
produces:
- application/json
parameters:
- name: slug
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/listing/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get own listing
x-testDescription: >-
Returns a specific listing with the inventory attached to the
return.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
delete:
description: Delete a listing and associated inventory
summary: Delete a listing
tags:
- listings
operationId: ObListingBySlugDelete
produces:
- application/json
parameters:
- name: slug
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: DELETE
uri: /ob/listing/
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Delete a listing
x-testDescription: Delete a listing and associated inventory
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/listing/{peerID}/{slug}':
get:
description: >-
This returns a listing wrapped in a Ricardian Contract which contains
the signatures needed to validate the listing. Alternatively, you can
fetch a listing using `/ipfs/{listing_hash}`
summary: Get an external listing
tags:
- listings
operationId: ObListingByPeerIDAndSlugGet
produces:
- application/json
parameters:
- name: peerID
in: path
required: true
type: string
description: ''
- name: slug
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/listing//
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get an external listing
x-testDescription: >-
This returns a listing wrapped in a Ricardian Contract which
contains the signatures needed to validate the listing.
Alternatively, you can fetch a listing using `/ipfs/{listing_hash}`
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/listing:
put:
description: >-
Update a listing. The currentSlug field is used specify the listing
being updated. If the listing contains a new slug, the listing will be
renamed using the new slug.
summary: Update a listing
tags:
- listings
operationId: ObListingPut
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/UpdateAListingrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: PUT
uri: /ob/listing
headers:
Content-Type: application/json
body: "{\"slug\":\"vintage-nice-dress\",\"metadata\":{\"contractType\":\"PHYSICAL_GOOD\",\"format\":\"FIXED_PRICE\",\"expiry\":\"2037-12-31T05:00:00Z\",\"pricingCurrency\":\"USD\"},\"item\":{\"title\":\"YuooMuoo V-neck Knitted Dress\",\"description\":\"This is a listing example.\",\"processingTime\":\"3 days\",\"price\":100,\"tags\":[\"vintage dress\"],\"images\":[{\"filename\":\"front\",\"tiny\":\"QmbjyAxYee4y3443kAMLcmRVwggZsRDKiyXnXus1qdJJWz\",\"small\":\"QmVsoT9iabv6GZhxhvtjSpQMJA6QyMivGTs6MmHJr6TBm9\",\"medium\":\"QmTJfeeapZwFM8EoZAuf16JsSJyxZtKaAR6hmWiMf4CTcF\",\"large\":\"QmfTKL3Z67mWKTKf9XKSCj1ptmDRaZLr5yjPS4JrVDgo5h\",\"original\":\"QmNexx7SaJCVCjyGGG3j2k7fenn3iVhtWdm9RvKvT7GTLq\"},{\"filename\":\"cream\",\"tiny\":\"QmU1cBgjyHpuzDYbEd4iDVuPzxgKM3CqhRhDJqkHWCKBXq\",\"small\":\"QmP3BVFuga7N4XEX8iU2MFYC7pc6mfTRQRrpZbKiVy2Csr\",\"medium\":\"QmQaSzaoHzp8raZLtPEFyCjTnwfXvDGKdXFM83STDVWG43\",\"large\":\"QmNsFdsX2LNALG2WBxw6E6FTPZWgJcRAcLHnKdWczrCNf9\",\"original\":\"QmTEUnCjuQPj1ggj5UL5vJujkgBiNYY4jkteugnogiCJny\"},{\"filename\":\"black\",\"tiny\":\"QmdA3Nmc8VnwSvt98Deo2RQztEiCsAkNLhron73bnBzARe\",\"small\":\"QmcADxUo89ZsEAWiYsuUk7hrgjWDMKXL1CtoA9sTNrQFFP\",\"medium\":\"QmZydpAJoLsJWbP5vmh59W6bW1kuiCV34yD62hq28AtP7b\",\"large\":\"QmXixGseetihe6vZiWcTw9N1pieok1YtRoxwvyd5d7jz6s\",\"original\":\"QmZsZ78FJwt281gfeUvGzDnsBW7WNjPWW3aJWDKskhpCRr\"},{\"filename\":\"other_red\",\"tiny\":\"QmbRFtxNWqACak1vvMJrrxUjzWjTJbMqi3vdUK5ZYvibgt\",\"small\":\"QmRdYph9YrfpdzMsaDnuySj6U4AY9dZhmjd8Cv2e6SscUG\",\"medium\":\"QmcD4pkp7SwCmN95pFnED2hz1LfsoYTPpynxeZbxCMoYPL\",\"large\":\"QmbSQZNAL3pZspUYWm6WNBD1oEQ6i9EnWPEsnk1DfdKnAv\",\"original\":\"QmZpgjK4jXmdqPg8Jt9YHGVmiuowVve3sbN2AZx7GXioDF\"}],\"categories\":[\"\U0001F45A Apparel & Accessories\"],\"condition\":\"New\",\"options\":[{\"name\":\"Color\",\"description\":\"Color of the dress.\",\"variants\":[\"Red\",\"Cream\",\"Black\"]},{\"name\":\"Sizes\",\"description\":\"Size of the dress.\",\"variants\":[\"Small\",\"Medium\",\"Large\"]}],\"skus\":[{\"variantCombo\":[0,0],\"productID\":\"dress-red-small\",\"surcharge\":0,\"quantity\":1000},{\"variantCombo\":[0,1],\"productID\":\"dress-red-medium\",\"surcharge\":0,\"quantity\":1000},{\"variantCombo\":[0,2],\"productID\":\"dress-red-large\",\"surcharge\":0,\"quantity\":1000},{\"variantCombo\":[1,0],\"productID\":\"dress-cream-small\",\"surcharge\":0,\"quantity\":1000},{\"variantCombo\":[1,1],\"productID\":\"dress-cream-medium\",\"surcharge\":0,\"quantity\":1000},{\"variantCombo\":[1,2],\"productID\":\"dress-cream-large\",\"surcharge\":0,\"quantity\":1000},{\"variantCombo\":[2,0],\"productID\":\"dress-black-small\",\"surcharge\":0,\"quantity\":1000},{\"variantCombo\":[2,1],\"productID\":\"dress-black-medium\",\"surcharge\":0,\"quantity\":1000},{\"variantCombo\":[2,2],\"productID\":\"dress-black-large\",\"surcharge\":0,\"quantity\":1000}],\"nsfw\":false},\"shippingOptions\":[{\"name\":\"Worldwide\",\"type\":\"FIXED_PRICE\",\"regions\":[\"ALL\"],\"services\":[{\"name\":\"Standard\",\"price\":0,\"estimatedDelivery\":\"5 days\"},{\"name\":\"Express\",\"price\":50,\"estimatedDelivery\":\"3 days\"}]}],\"taxes\":[],\"coupons\":[],\"moderators\":[],\"termsAndConditions\":\"Terms and conditions.\",\"refundPolicy\":\"Refund policy.\"}"
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Update a listing
x-testDescription: >-
Update a listing. The currentSlug field is used specify the listing
being updated. If the listing contains a new slug, the listing will
be renamed using the new slug.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
post:
description: Create a new listing and set its inventory
summary: Create a new listing (service; no options)
tags:
- listings
operationId: ObListingPost6
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/CreateANewListingServiceNoOptionsRequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/listing
headers:
Content-Type: application/json
body: "{\"slug\":\"vintage-dress-service-no-options\",\"metadata\":{\"contractType\":\"SERVICE\",\"format\":\"FIXED_PRICE\",\"expiry\":\"2037-12-31T05:00:00Z\",\"pricingCurrency\":\"USD\"},\"item\":{\"title\":\"Vintage dress (service; no options)\",\"description\":\"This is a listing example.\",\"processingTime\":\"3 days\",\"price\":100,\"tags\":[\"vintage dress\"],\"images\":[{\"filename\":\"front\",\"tiny\":\"QmbjyAxYee4y3443kAMLcmRVwggZsRDKiyXnXus1qdJJWz\",\"small\":\"QmVsoT9iabv6GZhxhvtjSpQMJA6QyMivGTs6MmHJr6TBm9\",\"medium\":\"QmTJfeeapZwFM8EoZAuf16JsSJyxZtKaAR6hmWiMf4CTcF\",\"large\":\"QmfTKL3Z67mWKTKf9XKSCj1ptmDRaZLr5yjPS4JrVDgo5h\",\"original\":\"QmNexx7SaJCVCjyGGG3j2k7fenn3iVhtWdm9RvKvT7GTLq\"},{\"filename\":\"cream\",\"tiny\":\"QmU1cBgjyHpuzDYbEd4iDVuPzxgKM3CqhRhDJqkHWCKBXq\",\"small\":\"QmP3BVFuga7N4XEX8iU2MFYC7pc6mfTRQRrpZbKiVy2Csr\",\"medium\":\"QmQaSzaoHzp8raZLtPEFyCjTnwfXvDGKdXFM83STDVWG43\",\"large\":\"QmNsFdsX2LNALG2WBxw6E6FTPZWgJcRAcLHnKdWczrCNf9\",\"original\":\"QmTEUnCjuQPj1ggj5UL5vJujkgBiNYY4jkteugnogiCJny\"},{\"filename\":\"black\",\"tiny\":\"QmdA3Nmc8VnwSvt98Deo2RQztEiCsAkNLhron73bnBzARe\",\"small\":\"QmcADxUo89ZsEAWiYsuUk7hrgjWDMKXL1CtoA9sTNrQFFP\",\"medium\":\"QmZydpAJoLsJWbP5vmh59W6bW1kuiCV34yD62hq28AtP7b\",\"large\":\"QmXixGseetihe6vZiWcTw9N1pieok1YtRoxwvyd5d7jz6s\",\"original\":\"QmZsZ78FJwt281gfeUvGzDnsBW7WNjPWW3aJWDKskhpCRr\"},{\"filename\":\"other_red\",\"tiny\":\"QmbRFtxNWqACak1vvMJrrxUjzWjTJbMqi3vdUK5ZYvibgt\",\"small\":\"QmRdYph9YrfpdzMsaDnuySj6U4AY9dZhmjd8Cv2e6SscUG\",\"medium\":\"QmcD4pkp7SwCmN95pFnED2hz1LfsoYTPpynxeZbxCMoYPL\",\"large\":\"QmbSQZNAL3pZspUYWm6WNBD1oEQ6i9EnWPEsnk1DfdKnAv\",\"original\":\"QmZpgjK4jXmdqPg8Jt9YHGVmiuowVve3sbN2AZx7GXioDF\"}],\"categories\":[\"\U0001F45A Apparel & Accessories\"],\"condition\":\"New\",\"options\":[],\"skus\":[],\"nsfw\":false},\"shippingOptions\":[],\"taxes\":[],\"coupons\":[],\"moderators\":[\"QmamG5uQjRqrdxAxp4DJK4TLvs2Yet8Nuiztip4ALD7i1U\",\"Qmbh95GgLueUusSgm4tUhHFEZA6hNuB8yYAgzi1FCDQX2G\"],\"termsAndConditions\":\"Terms and conditions.\",\"refundPolicy\":\"Refund policy.\"}"
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Create a new listing (service; no options)
x-testDescription: Create a new listing and set its inventory
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/config:
get:
description: Returns the node's own peer ID and the type of cryptocurrency used.
summary: Get node configuration
tags:
- miscellaneous
operationId: ObConfigGet
produces:
- application/json
parameters:
- name: Cookie
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/config
headers:
Cookie: '{{cookie}}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get node configuration
x-testDescription: Returns the node's own peer ID and the type of cryptocurrency used.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/peers:
get:
description: Returns a list of IDs of the peers connected to this node.
summary: Get connected peers
tags:
- miscellaneous
operationId: ObPeersGet
produces:
- application/json
parameters: []
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/peers
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get connected peers
x-testDescription: Returns a list of IDs of the peers connected to this node.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/status/{peerID}':
get:
description: Pings the peer and returns if it is online or not
summary: Get peer online status
tags:
- miscellaneous
operationId: ObStatusByPeerIDGet
produces:
- application/json
parameters:
- name: peerID
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/status/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get peer online status
x-testDescription: Pings the peer and returns if it is online or not
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/healthcheck:
get:
description: Pings the peer and returns if it is online or not
summary: Get health check on node
tags:
- miscellaneous
operationId: ObHealthcheckGet
produces:
- application/json
parameters: []
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/healthcheck
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get health check on node
x-testDescription: Pings the peer and returns if it is online or not
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/status/peerinfo/{peerId}':
get:
description: Get information on a peer
summary: Get peer info
tags:
- miscellaneous
operationId: ObStatusPeerinfoByPeerIdGet
produces:
- application/json
parameters:
- name: peerId
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/status/peerinfo/
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get peer info
x-testDescription: Get information on a peer
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/closestpeers/{peerId}':
get:
description: >-
Crawls the DHT and returns up to 20 of the closest peers to the given
ID.
summary: Crawl for closest peers
tags:
- miscellaneous
operationId: ObClosestpeersByPeerIdGet
produces:
- application/json
parameters:
- name: peerId
in: path
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/closestpeers/QmRBhyTivwngraebqBVoPYCh8SBrsagqRtMwj44dMLXhwn
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Crawl for closest peers
x-testDescription: >-
Crawls the DHT and returns up to 20 of the closest peers to the
given ID.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/publish:
post:
description: Publish any changes made on your node to the network.
summary: Publish changes to the network
tags:
- miscellaneous
operationId: ObPublishPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/publish
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Publish changes to the network
x-testDescription: Publish any changes made on your node to the network.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/purgecache:
post:
description: Purge any data you are seeding on the network.
summary: Purge cache
tags:
- miscellaneous
operationId: ObPurgecachePost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/purgecache
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Purge cache
x-testDescription: Purge any data you are seeding on the network.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/shutdown:
post:
description: Shutdown your node safely.
summary: Shutdown the node
tags:
- miscellaneous
operationId: ObShutdownPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/shutdown
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Shutdown the node
x-testDescription: Shutdown your node safely.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/moderators:
get:
description: >-
Returns a list of moderator peer IDs. Since the server must do a network
crawl to find the IDs, there are two ways make this query. The default
is a simple long polling GET which returns after the crawl completes. If
you want to receive the peer IDs asynchronously, add the async parameter
to the request and it will return a random ID which can be used to
receive the results over the websocket.
summary: Get a list of moderators
tags:
- moderators
operationId: ObModeratorsGet
produces:
- application/json
parameters:
- name: async
in: query
required: true
type: string
description: ''
- name: include
in: query
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/moderators?async=&include=
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get a list of moderators
x-testDescription: >-
Returns a list of moderator peer IDs. Since the server must do a
network crawl to find the IDs, there are two ways make this query.
The default is a simple long polling GET which returns after the
crawl completes. If you want to receive the peer IDs asynchronously,
add the async parameter to the request and it will return a random
ID which can be used to receive the results over the websocket.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/moderator:
put:
description: Update the moderation info for this node
summary: Update moderator info
tags:
- moderators
operationId: ObModeratorPut
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/UpdateModeratorInforequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: PUT
uri: /ob/moderator
headers:
Content-Type: application/json
body: >-
{"description":"Long time OpenBazaar moderator located in
Chicago","termsAndConditions":"Will moderate anything and
everything","languages":["English","Spanish"],"fee":{"feeType":"FIXED_PLUS_PERCENTAGE","fixedFee":{"currencyCode":"USD","amount":300},"percentage":5}}
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Update moderator info
x-testDescription: Update the moderation info for this node
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
post:
description: Make this node as a moderator and set the modertor's information.
summary: Set as moderator
tags:
- moderators
operationId: ObModeratorPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/SetAsModeratorrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/moderator
headers:
Content-Type: application/json
body: >-
{"description":"Long time OpenBazaar moderator located in
Chicago","termsAndConditions":"Will moderate anything and
everything","languages":["English","Spanish"],"fee":{"feeType":"FIXED_PLUS_PERCENTAGE","fixedFee":{"currencyCode":"USD","amount":300},"percentage":5}}
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Set as moderator
x-testDescription: Make this node as a moderator and set the modertor's information.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/moderator/{peerID}':
delete:
description: Unset self as moderator and delete moderation info
summary: Unset moderator
tags:
- moderators
operationId: ObModeratorByPeerIDDelete
produces:
- application/json
parameters:
- name: peerID
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: DELETE
uri: /ob/moderator/
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Unset moderator
x-testDescription: Unset self as moderator and delete moderation info
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/notifications:
get:
description: API call to retrieve notifications
summary: Fetch notifications
tags:
- notifications
operationId: ObNotificationsGet
produces:
- application/json
parameters:
- name: limit
in: query
required: true
type: string
description: ''
- name: offsetId
in: query
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/notifications?limit=&offsetId=
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Fetch notifications
x-testDescription: API call to retrieve notifications
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/marknotificationasread/{notificationId}':
post:
description: Mark a notification as read
summary: Mark notification as read
tags:
- notifications
operationId: ObMarknotificationasreadByNotificationIdPost
produces:
- application/json
parameters:
- name: notificationId
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/marknotificationasread/
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Mark notification as read
x-testDescription: Mark a notification as read
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/marknotificationsasread:
post:
description: Mark all notifications as read
summary: Mark notifications as read (all)
tags:
- notifications
operationId: ObMarknotificationsasreadPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/marknotificationsasread
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Mark notifications as read (all)
x-testDescription: Mark all notifications as read
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/notifications/{notificationId}':
delete:
description: Delete a notification
summary: Delete a notification
tags:
- notifications
operationId: ObNotificationsByNotificationIdDelete
produces:
- application/json
parameters:
- name: notificationId
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: DELETE
uri: /ob/notifications/
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Delete a notification
x-testDescription: Delete a notification
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
'/ob/order/{orderId}':
get:
description: Get an order by ID
summary: Get an order
tags:
- orders
operationId: ObOrderByOrderIdGet
produces:
- application/json
parameters:
- name: orderId
in: path
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/order/
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get an order
x-testDescription: Get an order by ID
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/purchases:
get:
description: Returns a list of all purchases that the node has made.
summary: Get purchase history
tags:
- orders
operationId: ObPurchasesGet
produces:
- application/json
parameters:
- name: limit
in: query
required: true
type: string
description: ''
- name: offsetId
in: query
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/purchases?limit=&offsetId=
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get purchase history
x-testDescription: Returns a list of all purchases that the node has made.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/sales:
get:
description: Returns a list of all sales that the node has made.
summary: Get sales history
tags:
- orders
operationId: ObSalesGet
produces:
- application/json
parameters:
- name: limit
in: query
required: true
type: string
description: ''
- name: offsetId
in: query
required: true
type: string
description: ''
- name: Content-Type
in: header
required: true
type: string
description: ''
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: GET
uri: /ob/sales?limit=&offsetId=
headers:
Content-Type: application/json
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get sales history
x-testDescription: Returns a list of all sales that the node has made.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/estimatetotal:
post:
description: Find out how much a listing is going to cost.
summary: Get Estimate to Purchase a Listing
tags:
- orders
operationId: ObEstimatetotalPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/GetEstimateToPurchaseAListingrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/estimatetotal
headers:
Content-Type: application/json
body: >-
{"address":"31 Spooner Street Apt.
124","city":"Quahog","state":"RI","shipTo":"Globex
Corporation","countryCode":"UNITED_STATES","postalCode":"","addressNotes":"Leave
package at back
door","items":[{"listingHash":"zb2rhad6oPUEHTNMCCS6MQND541S2KSa7DrYAaBAxQgRDYQ8C","quantity":1,"options":[{"name":"Color","value":"Cream"},{"name":"Sizes","value":"Medium"}],"shipping":{"value":0,"name":"Worldwide","service":"Standard","estimatedDelivery":"3
days","price":0},"moderator":"QmamG5uQjRqrdxAxp4DJK4TLvs2Yet8Nuiztip4ALD7i1U"}]}
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Get Estimate to Purchase a Listing
x-testDescription: Find out how much a listing is going to cost.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/purchase:
post:
description: "The purchase call can be made to a reachable or a unreachable vendor (offline or not able to receive incoming messages). \r\n\r\nAn order will be created in the AWAITING_PAYMENT state after this call.\r\n\r\nIf the total of the purchase is not more than 4X the current transaction fee, the purchase will be rejected (ie: if the fee is 0.0001, the total purchase must be more than 0.0004)."
summary: Purchase an item
tags:
- orders
operationId: ObPurchasePost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/PurchaseAnItemrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/purchase
headers:
Content-Type: application/json
body: >-
{"shipTo":"Dr Washington Sanchez","address":"1060 W
Addison","city":"Chicago","state":"Illinois","countryCode":"UNITED_STATES","postalCode":"60613","addressNotes":"","items":[{"listingHash":"zb2rhXdiuRc5GhfmnvP35DTQNur3cGRUBfL3WNNSF3ZKHEkJd","quantity":1,"options":[],"shipping":{"name":"USA","service":"USPS
Standard"},"memo":"thanks!","coupons":[]}],"moderator":"QmamG5uQjRqrdxAxp4DJK4TLvs2Yet8Nuiztip4ALD7i1U"}
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Purchase an item
x-testDescription: "The purchase call can be made to a reachable or a unreachable vendor (offline or not able to receive incoming messages). \r\n\r\nAn order will be created in the AWAITING_PAYMENT state after this call.\r\n\r\nIf the total of the purchase is not more than 4X the current transaction fee, the purchase will be rejected (ie: if the fee is 0.0001, the total purchase must be more than 0.0004)."
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/orderconfirmation:
post:
description: >-
Online orders are confirmed instantly. This API call is to confirm an
order sent to the vendor while he was offline.
summary: Confirm an order (offline)
tags:
- orders
operationId: ObOrderconfirmationPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/ConfirmAnOrderofflinerequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/orderconfirmation
headers:
Content-Type: application/json
body: >-
{"orderId":"QmamudHQGtztShX7Nc9HcczehdpGGWpFBWu2JvKWcpELxr","reject":false}
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Confirm an order (offline)
x-testDescription: >-
Online orders are confirmed instantly. This API call is to confirm
an order sent to the vendor while he was offline.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/orderfulfillment:
post:
description: >-
Send an order fulfillment message to the buyer. Typically used to tell
the buyer an item has been shipped.
summary: Fulfill an order
tags:
- orders
operationId: ObOrderfulfillmentPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/FulfillAnOrderrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/orderfulfillment
headers:
Content-Type: application/json
body: >-
{"orderId":"QmSJmnSgxfME35BiwedKvVMRBcFu4NA7MpB22vhsZ9GF2H","physicalDelivery":[{"shipper":"UPS","trackingNumber":"1Z204E380338943508"}],"digitalDelivery":[{"url":"http://example.com/download.mp3","password":"letmein"}]}
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Fulfill an order
x-testDescription: >-
Send an order fulfillment message to the buyer. Typically used to
tell the buyer an item has been shipped.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/ordercompletion:
post:
description: >-
Send the order complete message (including the rating) to the vendor. If
this is a moderated order, it will sign and release the funds to the
vendor.
summary: Complete an order
tags:
- orders
operationId: ObOrdercompletionPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/CompleteAnOrderrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/ordercompletion
headers:
Content-Type: application/json
body: >-
{"orderId":"QmP9rtg9tm5zv8RrPTJpyDc3bfqwnaogjbneBTPaf8TjA9","ratings":[{"slug":"vintage-nice-dress","overall":3,"quality":4,"description":5,"deliverySpeed":5,"customerService":3,"review":"This
rocks!","anonymous":true}]}
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Complete an order
x-testDescription: >-
Send the order complete message (including the rating) to the
vendor. If this is a moderated order, it will sign and release the
funds to the vendor.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/refund:
post:
description: >-
Refund the order. If it's a moderated order, it will release the funds
back to the buyer. If it's direct it will send the coins from your
wallet.
summary: Refund an order
tags:
- orders
operationId: ObRefundPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/RefundAnOrderrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/refund
headers:
Content-Type: application/json
body: '{"orderId":"QmamudHQGtztShX7Nc9HcczehdpGGWpFBWu2JvKWcpELxr"}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false
x-matchResponseSchema: true
headers: {}
x-testShouldPass: true
x-testEnabled: true
x-testName: Refund an order
x-testDescription: >-
Refund the order. If it's a moderated order, it will release the
funds back to the buyer. If it's direct it will send the coins from
your wallet.
x-operation-settings:
CollectParameters: false
AllowDynamicQueryParameters: false
AllowDynamicFormParameters: false
IsMultiContentStreaming: false
/ob/ordercancel:
post:
description: >-
Cancel an outstanding offline order. It will move the bitcoins back into
your wallet.
summary: Cancel an offline order
tags:
- orders
operationId: ObOrdercancelPost
produces:
- application/json
parameters:
- name: Content-Type
in: header
required: true
type: string
description: ''
- name: Body
in: body
required: true
description: ''
schema:
$ref: '#/definitions/CancelAnOfflineOrderrequest'
responses:
'200':
description: ''
security:
- auth: []
x-unitTests:
- request:
method: POST
uri: /ob/ordercancel
headers:
Content-Type: application/json
body: '{"orderId":"QmamudHQGtztShX7Nc9HcczehdpGGWpFBWu2JvKWcpELxr"}'
expectedResponse:
x-allowExtraHeaders: true
x-bodyMatchMode: NONE
x-arrayOrderedMatching: false
x-arrayCheckCount: false