OpenAPI Specification
openapi: 3.0.1
info:
contact:
email: christo.delange@roadsync.com
description: This API allows the Roadsync clients to manage aspects of the RoadSync service via an API.
license:
name: Copyright (c) 2020, RoadSync Inc.
title: Client API v1.8 authenticated product API
version: 1.8.45
x-api-id: 3ea39084-d8df-11ea-ad77-0017b600647f
x-audience: external-partner
servers:
- url: https://client-api.staging.roadsync.com/{basePath}
variables:
Product:
default: ClientApi
basePath:
default: v1
security:
- api_key: []
- session_token: []
tags:
- description: Product operations (company)
name: product
paths:
/product/list:
get:
description: Retrieve a list of products for a location
operationId: product_list_get
parameters:
- explode: true
in: query
name: locationId
required: true
schema:
$ref: '#/components/schemas/HashedId'
style: form
responses:
'200':
$ref: '#/components/responses/ProductListResponse'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFound404'
'429':
$ref: '#/components/responses/TooManyRequests429'
'500':
$ref: '#/components/responses/ServiceError500'
default:
$ref: '#/components/responses/UnexpectedError'
security:
- api_key: []
- session_token: []
summary: Retrieve a list of products for a location
tags:
- product
options:
operationId: product_list_options
responses:
'200':
$ref: '#/components/responses/Options200'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFound404'
'429':
$ref: '#/components/responses/TooManyRequests429'
'500':
$ref: '#/components/responses/ServiceError500'
default:
$ref: '#/components/responses/UnexpectedError'
security: []
tags:
- product
components:
schemas:
CodeMessage:
additionalProperties: false
description: A generic error object generally used for 500 responses
properties:
code:
$ref: '#/components/schemas/CodeEnum'
message:
$ref: '#/components/schemas/Message'
required:
- code
- message
CodeEnum:
default: Success
enum:
- Success
- Error
- Exception
type: string
ProductSelectType:
enum:
- ''
- none
- preselected
- obligatory
type: string
Message:
maxLength: 2048
pattern: /^[a-zA-Z0-9 ]*$/
type: string
ProductType:
enum:
- service
- item
- custom
- other
- addmultiplelineitems
- category
- tax
- ''
type: string
Problem:
additionalProperties: false
properties:
detail:
description: 'A human readable explanation specific to this occurrence of the
problem.
'
example: Connection to database timed out
maxLength: 2048
pattern: /^.*$/
type: string
instance:
description: 'An absolute URI that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.
'
format: uri
maxLength: 2048
pattern: /^.*$/
type: string
status:
description: 'The HTTP status code generated by the origin server for this occurrence
of the problem.
'
example: 503
exclusiveMaximum: true
format: int32
maximum: 600
minimum: 100
type: integer
title:
description: 'A short, summary of the problem type. Written in english and readable
for engineers (usually not suited for non technical stakeholders and
not localized); example: Service Unavailable
'
maxLength: 256
pattern: /^.*$/
type: string
type:
default: about:blank
description: 'An absolute URI that identifies the problem type. When dereferenced,
it SHOULD provide human-readable documentation for the problem type
(e.g., using HTML).
'
example: https://problems.roadsync.com/problem/unspecified-error
format: uri
maxLength: 2048
pattern: /^.*$/
type: string
type: object
Product:
additionalProperties: false
properties:
accountingProducts:
items:
$ref: '#/components/schemas/AccountingProduct'
maxItems: 128
type: array
cost:
format: float
maximum: 999999999.99
minimum: -999999999.99
type: number
generalLedger:
maxLength: 2048
pattern: /^.*$/
type: string
id:
$ref: '#/components/schemas/HashedId'
isTaxable:
type: boolean
locationId:
$ref: '#/components/schemas/HashedId'
name:
maxLength: 2048
pattern: /^.*$/
type: string
parentId:
$ref: '#/components/schemas/HashedId'
parentPath:
maxLength: 2048
pattern: /^.*$/
type: string
selectType:
$ref: '#/components/schemas/ProductSelectType'
type:
$ref: '#/components/schemas/ProductType'
weight:
format: int64
maximum: 999999999
minimum: 0
type: integer
type: object
FeatureType:
enum:
- unknown
- cash
- expeditedpayout
- cards
- rcptnotifs
- paycodes
- monthlyfee
- feeperproduct
- treatcashascard
- hideclerkname
- signaturecapture
- payoutamountsinemail
- zeroamountsinemail
- disableinvoices
- enableworkorders
- enableproductscomment
- disablefleetcheck
- publiccheckout
- invoiceattachment
- cardautopayout
- reportdollarsigndisabled
- allowdisableconvfee
- paysafepayment
- notifyinvoicestatuschange
- survey
- invoicecsvtimestampenabled
- directbill
- hostbill
- companydashboard
- addmultiplelineitems
- expeditedach
- namerequiredwithcard
- licenserequiredwithcard
- invoicesubmissionconfirmation
- accountingquickbooks
- accountingfreshbooks
- allowzerodollarinvoice
- instantpayout
- canpayinvoices
- twodaymanualpayout
- ach
- creditcardatpubliccheckoutonly
- conveniencefeeperlineitem
- invoicebatches
- skipcheckdetailsscreen
- sendtotaltopayerbutton
- generalledger
- wexapi
- roadsynccreditcardprocessing
type: string
HashedId:
maxLength: 128
pattern: /^\w+$/
type: string
AccountingProduct:
additionalProperties: false
properties:
externalId:
maxLength: 2048
pattern: /^.*$/
type: string
featureType:
$ref: '#/components/schemas/FeatureType'
type: object
ProductListResponse:
allOf:
- $ref: '#/components/schemas/CodeMessage'
- properties:
product_list:
description: A list of products
items:
$ref: '#/components/schemas/Product'
maxItems: 128
type: array
type: object
responses:
ForbiddenError:
content:
application/json:
schema:
$ref: '#/components/schemas/CodeMessage'
description: Request is completely forbidden. API not provided or method and or endpoint not supported
headers:
WWW_Authenticate:
explode: false
schema:
maxLength: 2048
pattern: /^.*$/
type: string
style: simple
NotFound404:
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
description: 404 Not found
TooManyRequests429:
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
description: 429 too many requests response
ProductListResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/ProductListResponse'
description: A product list response
ServiceError500:
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: Service Error
UnauthorizedError:
content:
application/json:
schema:
$ref: '#/components/schemas/CodeMessage'
description: API key is missing or invalid
headers:
WWW_Authenticate:
explode: false
schema:
maxLength: 2048
pattern: /^.*$/
type: string
style: simple
UnexpectedError:
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
description: unexpected error response
Options200:
content:
application/json:
schema:
additionalProperties: false
type: object
description: 200 response
headers:
Access-Control-Allow-Credentials:
explode: false
schema:
type: boolean
style: simple
Access-Control-Allow-Headers:
explode: false
schema:
maxLength: 256
pattern: ^[a-zA-Z0-9 ,]*$
type: string
style: simple
Access-Control-Allow-Methods:
explode: false
schema:
maxLength: 256
pattern: ^[a-zA-Z0-9 ,]*$
type: string
style: simple
Access-Control-Allow-Origin:
explode: false
schema:
maxLength: 256
pattern: /^.*$/
type: string
style: simple
Cache-Control:
explode: false
schema:
maxLength: 256
pattern: ^[a-zA-Z0-9 ,\-]*$
type: string
style: simple
Expires:
explode: false
schema:
maxLength: 256
pattern: ^[a-zA-Z0-9 \-]*$
type: string
style: simple
Pragma:
explode: false
schema:
maxLength: 256
pattern: ^[a-zA-Z0-9 ,]*$
type: string
style: simple
securitySchemes:
api_key:
in: header
name: x-api-key
type: apiKey
x-apikeyInfoFunc: client_api_server.controllers.authorization_controller.check_api_key
session_token:
bearerFormat: JWT
scheme: bearer
type: http
x-apikeyInfoFunc: client_api_server.controllers.authorization_controller.check_session_token