openapi: 3.2.0 info: title: Connecteam API documentation Sales:Sales V1:Sales Transactions API version: v1 servers: - url: https://api.connecteam.com/ tags: - name: Sales:Sales V1:Sales Transactions paths: /sales/v1/transactions: post: tags: - Sales:Sales V1:Sales Transactions summary: Create transactions description: Create new sale transactions for specified locations. operationId: create_transactions_sales_v1_transactions_post security: - APIKeyHeader: [] - OAuth2: - sales_data.write requestBody: required: true content: application/json: schema: title: Request allOf: - $ref: '#/components/schemas/TransactionCreateRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/APIResponse_TransactionCreateResponse_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Sales:Sales V1:Sales Transactions summary: Delete transactions description: Delete transactions within a specified time period. All transactions during this period will be permanently removed. operationId: delete_transactions_by_period_sales_v1_transactions_delete security: - APIKeyHeader: [] - OAuth2: - sales_data.delete parameters: - name: locationId in: query required: true schema: title: Locationid description: The location ID derived from the locations API type: integer description: The location ID derived from the locations API - name: startTime in: query required: true schema: title: Starttime description: The start time of the specified period in UNIX timestamp type: integer description: The start time of the specified period in UNIX timestamp - name: endTime in: query required: true schema: title: Endtime description: The end time of the specified period in UNIX timestamp type: integer description: The end time of the specified period in UNIX timestamp responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/APIResponse_BaseResponse_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sales/v1/transactions/{transactionId}: delete: tags: - Sales:Sales V1:Sales Transactions summary: Delete transaction description: Delete single transaction by its ID operationId: delete_transaction_sales_v1_transactions__transactionId__delete security: - APIKeyHeader: [] - OAuth2: - sales_data.delete parameters: - name: transactionId in: path required: true schema: title: Transactionid description: The unique identifier of the transaction type: string description: The unique identifier of the transaction responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/APIResponse_BaseResponse_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: TransactionData: properties: transactionId: type: string title: Transactionid description: Unique identifier for the transaction locationId: type: integer title: Locationid description: The location ID derived from the locations API saleType: allOf: - $ref: '#/components/schemas/SaleType' description: The type of the sale createdAt: type: integer title: Createdat description: The timestamp of the sale in UNIX format (UTC) finalSaleAmount: type: number title: Finalsaleamount description: The final sale amount of the transaction after discounts/changes and without applicable taxes taxAmount: type: number title: Taxamount description: The tax amount to be added in absolute number (not in percentage) currency: type: string title: Currency description: The currency of the transaction type: object required: - transactionId - locationId - saleType - createdAt - finalSaleAmount title: TransactionData HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError TransactionCreateRequest: properties: transactionsCreateRequest: items: $ref: '#/components/schemas/TransactionCreateItem' type: array maxItems: 100 minItems: 1 title: Transactionscreaterequest description: List of transactions to create type: object required: - transactionsCreateRequest title: TransactionCreateRequest SaleType: type: string enum: - SALE - VOID - RECALL - REFUND - SPLIT - UPDATE - TRANSFER - FLOAT - TRANSITORY - CROSS_BL - CANCEL - MANUAL title: SaleType description: An enumeration. APIResponse_BaseResponse_: properties: requestId: type: string title: Requestid data: $ref: '#/components/schemas/BaseResponse' type: object required: - data title: APIResponse[BaseResponse] BaseResponse: properties: {} type: object title: BaseResponse TransactionCreateItem: properties: locationId: type: integer title: Locationid description: The unique identifier of the location saleType: allOf: - $ref: '#/components/schemas/SaleType' description: 'The type of the sale. Current options are: SALE,VOID,REFUND,SPLIT,TRANSFER' createdAt: type: integer title: Createdat description: The timestamp of the sale in UNIX format (UTC) finalSaleAmount: type: number title: Finalsaleamount description: The final sale amount of the transaction after discounts/changes and without applicable taxes taxAmount: type: number title: Taxamount description: The tax amount to be added in absolute number (not in percentage) currency: type: string title: Currency description: The currency of the transaction type: object required: - locationId - saleType - createdAt - finalSaleAmount title: TransactionCreateItem TransactionCreateResponse: properties: transactions: items: $ref: '#/components/schemas/TransactionData' type: array title: Transactions description: List of created transactions type: object required: - transactions title: TransactionCreateResponse APIResponse_TransactionCreateResponse_: properties: requestId: type: string title: Requestid data: $ref: '#/components/schemas/TransactionCreateResponse' type: object required: - data title: APIResponse[TransactionCreateResponse] securitySchemes: APIKeyHeader: type: apiKey description: The Api key of the company given by Connecteam in: header name: X-API-KEY OAuth2: type: oauth2 description: OAuth2 Bearer token flows: clientCredentials: scopes: account_information.read: account information - read account_information.write: account information - write account_information.delete: account information - delete company_policies.read: company policies - read company_policies.write: company policies - write company_policies.delete: company policies - delete company_insights.read: company insights - read users.read: users - read users.write: users - write users.delete: users - delete assets.read: assets - read assets.write: assets - write assets.delete: assets - delete sales_data.read: sales data - read sales_data.write: sales data - write sales_data.delete: sales data - delete attachments.read: attachments - read attachments.write: attachments - write attachments.delete: attachments - delete quick_tasks.read: quick tasks - read quick_tasks.write: quick tasks - write quick_tasks.delete: quick tasks - delete publishers.read: publishers - read publishers.write: publishers - write publishers.delete: publishers - delete chat.read: chat - read chat.write: chat - write chat.delete: chat - delete jobs.read: jobs - read jobs.write: jobs - write jobs.delete: jobs - delete schedule.read: schedule - read schedule.write: schedule - write schedule.delete: schedule - delete daily_note.read: daily note - read daily_note.write: daily note - write daily_note.delete: daily note - delete time_clock.read: time clock - read time_clock.write: time clock - write time_clock.delete: time clock - delete nfc.read: nfc - read nfc.write: nfc - write nfc.delete: nfc - delete time_off.read: time off - read time_off.write: time off - write time_off.delete: time off - delete pay_rates.read: pay rates - read pay_rates.write: pay rates - write pay_rates.delete: pay rates - delete forms.read: forms - read forms.write: forms - write forms.delete: forms - delete onboarding.read: onboarding - read onboarding.write: onboarding - write onboarding.delete: onboarding - delete settings.read: settings - read settings.write: settings - write settings.delete: settings - delete company_checklist.read: company checklist - read company_checklist.write: company checklist - write recognitions.read: recognitions - read celebrations.read: celebrations - read tokenUrl: /oauth/v1/token HTTPBasic: type: http description: Use client_id as Username and client_secret as Password scheme: basic