ServiceChannel Invoices API

The Invoices API from ServiceChannel — 18 operation(s) for invoices.

OpenAPI Specification

servicechannel-invoices-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  version: bearer.v1
  title: Fixxbook.Bearer.Api.V1 AfterHours Invoices API
  isOdataApi: false
  relativePath: ''
  discoveryPath: docs/bearer.v1
  _isAuthorizedAccess: true
host: sb2fixxbook.servicechannel.com:443
basePath: /api
schemes:
- https
security:
- oauth2: []
tags:
- name: Invoices
paths:
  /invoices/{subscriberId}/InvoiceRequirements:
    get:
      tags:
      - Invoices
      summary: Retrieve general invoice settings for a subscriber
      description: "Returns general invoice settings for the specified subscriber.\r\n            <br />Both subscribers and providers can use this method.\r\n             • **Subscribers** should enter their subscriber ID.\r\n             • **Providers** need to pass the ID of the subscriber they have a contract with.\r\n            <br />Subscriber users with the *Super Admin* secondary role set up general invoice parameters in **Admin** &gt; **Invoices** &gt; **General**, where they configure when invoices can be created, if providers should enter a resolution before submitting invoices, and whether any restrictions should apply to invoice numbers. Other parameters may be available if the corresponding features are turned on for the subscriber. Learn more about [configuring general invoice settings](https://servicechannel.atlassian.net/wiki/spaces/SCU/pages/557220138/General+Invoice+Configuration) in ServiceChannel University."
      operationId: GETv3_invoices_{subscriberId}_InvoiceRequirements
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: subscriberId
        in: path
        description: Unique numeric identifier of the subscriber to return general invoice settings for.
        required: true
        type: integer
        format: int32
      responses:
        '200':
          description: General invoice settings for the specified subscriber are in the response.
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.InvoiceSettingsGeneral'
        '400':
          description: "The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.\r\n            <br/>Error codes:\r\n            503 - The provider has no contract with the requested subscriber\r\n            503 - No access. Please check if the SubscriberId is valid"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "The request is not authorized.\r\n            <br/>Error codes:\r\n            504 - API call rejected by security permissions"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Any
  /invoices/{subscriberId}/OtherChargeOptions/{category}:
    get:
      tags:
      - Invoices
      summary: Retrieve invoice other descriptions for selected category and subscriber
      description: "Returns invoice other descriptions for the specified subscriber and category.\r\n            <br />Both subscribers and providers can use this method.\r\n             • **Subscribers** should enter their subscriber ID.\r\n             • **Providers** need to pass the ID of the subscriber they have a contract with."
      operationId: GETv3_invoices_{subscriberId}_OtherChargeOptions_{category}
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: subscriberId
        in: path
        description: Unique numeric identifier of the subscriber
        required: true
        type: integer
        format: int32
      - name: category
        in: path
        description: Category name
        required: true
        type: string
      responses:
        '200':
          description: Invoice other descriptions for the specified subscriber and the category are in the response.
        '400':
          description: "The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.\r\n            <br/>Error codes:\r\n            503 - The provider has no contract with the requested subscriber\r\n            503 - Invalid category name\r\n            503 - No access. Please check if the SubscriberId is valid"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "The request is not authorized.\r\n            <br/>Error codes:\r\n            504 - API call rejected by security permissions"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Any
  /invoices/{subscriberId}/InvoiceRejectionReasons:
    get:
      tags:
      - Invoices
      summary: Retrieve invoice rejection reasons for a subscriber
      description: "Returns invoice rejection reasons for a subscriber\r\n            <br />Both subscribers and providers can use this method.\r\n             • **Subscribers** should enter their subscriber ID.\r\n             • **Providers** need to pass the ID of the subscriber they have a contract with."
      operationId: GETv3_invoices_{subscriberId}_InvoiceRejectionReasons
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: subscriberId
        in: path
        description: Unique numeric identifier of the subscriber to return invoice rejection reasons for.
        required: true
        type: integer
        format: int32
      responses:
        '200':
          description: Invoice rejection reasons for the specified subscriber are in the response.
          schema:
            type: array
            items:
              $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.InvoiceRejectionReasonResponse'
        '400':
          description: "The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.\r\n            <br/>Error codes:\r\n            503 - The provider has no contract with the requested subscriber\r\n            503 - No access. Please check if the SubscriberId is valid"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "The request is not authorized.\r\n            <br/>Error codes:\r\n            504 - API call rejected by security permissions"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Any
  /invoices/{invoiceId}/reject:
    put:
      tags:
      - Invoices
      summary: Allows reject non-MLI(Multilevel Invoice Approval) invoice
      description: <para>Allows reject non-MLI(Multilevel Invoice Approval) invoice</para>
      operationId: PUTv3_invoices_{invoiceId}_reject?comments={comments}&isNotifyProvider={isNotifyProvider}&additionalEmails={additionalEmails}
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: invoiceId
        in: path
        description: Invoice Identifier
        required: true
        type: integer
        format: int32
      - name: comments
        in: query
        description: Comments
        required: true
        type: string
      - name: isNotifyProvider
        in: query
        description: Request to notify provider
        required: false
        type: boolean
        default: false
      - name: additionalEmails
        in: query
        description: Additional Emails
        required: false
        type: string
      responses:
        '204':
          description: Indicates that the request succeeded
        '400':
          description: "Bad Request - the request could not be understood or was missing required parameters.\r\n            <br/>Error codes:\r\n            <br/> 502 - Wrong Invoice Id \r\n            <br/> 503 - MLI(Multilevel Invoice Approval) enabled"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "Indicates that the requested resource requires authentication.\r\n            <br/>Error codes:\r\n            <br/> 504 - API call rejected by security permissions;"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '409':
          description: "Indicates that the request could not carry out notification due to internal error or invalid argument.\r\n            <br/>Error codes:\r\n            <br/> 6018 - Email was not sent"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Subscribers
  /invoices/{invoiceId}/onhold:
    put:
      tags:
      - Invoices
      summary: Allows put invoice on hold for non-MLI(Multilevel Invoice Approval) invoice
      description: <para>Allows put invoice on hold for non-MLI(Multilevel Invoice Approval) invoice</para>
      operationId: PUTv3_invoices_{invoiceId}_onhold?comments={comments}
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: invoiceId
        in: path
        description: Invoice Identifier
        required: true
        type: integer
        format: int32
      - name: comments
        in: query
        description: Comments
        required: true
        type: string
      responses:
        '204':
          description: Indicates that the request succeeded
        '400':
          description: "Bad Request - the request could not be understood or was missing required parameters.\r\n            <br/>Error codes:\r\n            <br/> 502 - Wrong Invoice Id \r\n            <br/> 503 - MLI(Multilevel Invoice Approval) enabled"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "Indicates that the requested resource requires authentication.\r\n            <br/>Error codes:\r\n            <br/> 504 - API call rejected by security permissions;"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Subscribers
  /invoices/{invoiceId}/approve:
    put:
      tags:
      - Invoices
      summary: Allows approve non-MLI(Multilevel Invoice Approval) invoice
      description: <para>Allows approve non-MLI(Multilevel Invoice Approval) invoice</para>
      operationId: PUTv3_invoices_{invoiceId}_approve?approvalCode={approvalCode}&comments={comments}&category={category}
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: invoiceId
        in: path
        description: Invoice Identifier
        required: true
        type: integer
        format: int32
      - name: approvalCode
        in: query
        description: Approval Code
        required: true
        type: string
      - name: comments
        in: query
        description: Comments
        required: true
        type: string
      - name: category
        in: query
        description: Category
        required: true
        type: string
      responses:
        '204':
          description: Indicates that the request succeeded
        '400':
          description: "Bad Request - the request could not be understood or was missing required parameters.\r\n            <br/>Error codes:\r\n            <br/> 502 - Wrong Invoice Id\r\n            <br/> 503 - MLI(Multilevel Invoice Approval) enabled"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: Indicates that the requested resource requires authentication.<br>Error codes:<br> 504 - API call rejected by security permissions;
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Subscribers
  /invoices/statistics:
    get:
      tags:
      - Invoices
      summary: Retrieve statistics of all invoices
      description: "Retrieves statistics of all invoices. Returns the statistics of all invoices for successful request.\r\n            <br /><br />Only for providers usage."
      operationId: GETv3_invoices_statistics?daysPeriod={daysPeriod}&approvedInThePastDaysPeriod={approvedInThePastDaysPeriod}
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: daysPeriod
        in: query
        description: Period in days, last X days for which Invoices statistics was collected (30 by Default).
        required: false
        type: integer
        format: int32
      - name: approvedInThePastDaysPeriod
        in: query
        description: Period in days, last X days during which Invoices are approved (3 by Default).
        required: false
        type: integer
        format: int32
      responses:
        '200':
          description: Indicates that the request succeeded and that the requested information is in the response.
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.InvoiceStatisticsResponse'
        '400':
          description: "Bad Request - the request could not be understood or was missing required parameters.\r\n            <br/>Error codes:\r\n            <br/> 503 - Only for providers usage;"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "Indicates that the requested resource requires authentication.\r\n            <br/>Error codes:\r\n            <br/> 504 - API call rejected by security permissions;"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Any
  /invoices:
    post:
      tags:
      - Invoices
      summary: Add an invoice to a work order
      description: "Creates an invoice in the *Open* status for the specified work order.\r\n            <br />Find out more about [creating an invoice](https://servicechannel.atlassian.net/wiki/spaces/SCU/pages/2205811424/Creating+an+Invoice) in ServiceChannel University."
      operationId: POSTv3_invoices
      consumes:
      - application/json
      - text/json
      produces:
      - application/json
      - text/json
      parameters:
      - name: request
        in: body
        description: "Request model to create an invoice for the specified work order.\r\n            <br />**Required parameters**:\r\n             • **InvoiceNumber**. Invoice number created by a user.\r\n             • **WoIdentifier**. Unique work order identifier (can be *TrackingNumber* or *WorkOrderNumber* for Contractor and *TrackingNumber* or *PurchaseNumber* for Client).\r\n            <br />If there is no need to specify any details in *Labors*, *Materials*, *Travels*, and *Others* objects, you can send the request without them. \r\n            <br />**Note**: Work Order should be in the *Completed* status to successfully create an invoice."
        required: true
        schema:
          $ref: '#/definitions/ServiceChannel.Services.WebApi.Models.Request.Invoices.CreateInvoiceRequest'
      responses:
        '201':
          description: The ID of the created invoice is in the response.
        '400':
          description: "The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.\r\n            <br/>Error codes:\r\n            503 - Request should not be null\r\n            601 - Location not found\r\n            607 - Empty Location State\r\n            904 - Invalid WO Status. WO must be in 'COMPLETED' status with empty extended status or 'COMPLETED' status with 'CONFIRMED' extended status\r\n            914 - Invalid 'Currency' value\r\n            917 - Invalid Tracking Number\r\n            1100 - Invalid Other Amount Description\r\n            1101 - Invalid Tax2 name\r\n            1103 - Invalid Total\r\n            1104 - Invoice Total > NTE\r\n            1105 - Invoice exists\r\n            1106 - Invoice Creation Error\r\n            1107 - Duplicate Invoice number\r\n            1108 - Total is null\r\n            1109 - Completed Date is null\r\n            1110 - Invoice Date < Completed Date\r\n            1111 - This invoice is set to auto-invoice\r\n            1112 - Electronic Signature Agreement Required\r\n            1113 - Work order not found\r\n            1114 - Wrong Work Order currency\r\n            1115 - Work order currency not found\r\n            1116 - Invoicing is disabled. Invoicing might be disabled if your company account is currently in an inactive state in Fixxbook\r\n            1117 - Invoice creation Unexpected Result\r\n            1119 - Invoice labor amount is not equals summary labor items \r\n            1120 - Invoice material amount is not equals summary material items amounts\r\n            1121 - Invoice Date is older than X day(s) from today\r\n            1122 - Invoice Date is greater than X day(s) from today\r\n            1123 - Invoice material description length overflow\r\n            1124 - Invoice material part number length overflow\r\n            1125 - Tax validation error: X\r\n            1126 - Sales Tax should be 0 - X location\r\n            1127 - Invalid Invoice Number\r\n            1135 - Locations can't have GST tax\r\n            1136 - Locations can't have tax2. Only invoices for Canadian Locations can have the Tax2Details array. Tax2Details is only applicable for invoices of locations in countries that have some form of a value-added tax\r\n            1145 - You have an outstanding balance with ServiceChannel. In order to invoice, please login to Fixxbook.com and update your Payment Method. Once your payment Method is updated you will be able to invoice\r\n            1146 - Invoice doesn't have Taxes Breakdown\r\n            1147 - Invoice Taxes Breakdown has incorrect sum\r\n            1151 - Labor Line Items Required\r\n            1152 - Material Line Items Required\r\n            1159 - Invoice material unit type is invalid (should be from 1 to 7)\r\n            1163 - Resolution text required in Invoice Text field\r\n            1180 - Invoice Number is not correct\r\n            1193 - Negative amounts in Other Line Items not allowed\r\n            1194 - Invoice labor skill level is invalid (should be from 1 to 3)\r\n            1195 - Invoice labor type is invalid (should be from 1 to 3)\r\n            1196 - Invoice technician quantity is invalid (should be > 0)\r\n            1198 - The explanation of Dispute status is empty\r\n            11260 - Tax not supported for this client. For exceptions use ServiceChannel website\r\n            11931 - Negative amounts in Travel Line Items not allowed\r\n            11932 - Negative amounts in Material Line Items not allowed\r\n            11933 - Negative amounts in Labor Line Items not allowed\r\n            11992 - Vendor Id is not valid"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "The request is not authorized.\r\n            <br/>Error codes:\r\n            <br/> 504 - API call rejected by security permissions"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Any
  /invoices/{invoiceId}:
    get:
      tags:
      - Invoices
      summary: Get an invoice
      description: Returns the details of the specified invoice.
      operationId: GETv3_invoices_{invoiceId}
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: invoiceId
        in: path
        description: Numeric identifier of the invoice to get the details for.
        required: true
        type: integer
        format: int32
      responses:
        '200':
          description: The specified invoice is in the response.
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.ApiGetInvoiceResponse'
        '400':
          description: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "The request is not authorized.\r\n            <br/>Error codes:\r\n            <br/> 504 - API call rejected by security permissions"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '404':
          description: The requested resource does not exist on the server.
      deprecated: false
      x-access: Any
  /invoices/{invoiceId}/discrepancy:
    get:
      tags:
      - Invoices
      summary: Get rates discrepancy
      description: Retrieves Invoice rates discrepancy information. Returns the labor list with rates discrepancy for the specified invoice.
      operationId: GETv3_invoices_{invoiceId}_discrepancy
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: invoiceId
        in: path
        description: Invoice identifier.
        required: true
        type: integer
        format: int32
      responses:
        '200':
          description: Indicates that the request succeeded and that the requested information is in the response.
          schema:
            type: array
            items:
              $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.RateDiscrepancy'
        '400':
          description: Bad Request - the request could not be understood or was missing required parameters.
          schema:
            type: array
            items:
              $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.RateDiscrepancy'
        '401':
          description: "Indicates that the requested resource requires authentication.\r\n            <br/>Error codes:\r\n            <br/> 504 - API call rejected by security permissions;"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '404':
          description: Indicates that the requested resource does not exist on the server.
      deprecated: false
      x-access: Any
  /invoices/{invoiceId}/discrepancyExtended:
    get:
      tags:
      - Invoices
      summary: Get rates discrepancy
      description: Retrieves Invoice rates discrepancy information. Returns the labor list with rates discrepancy for the specified invoice.
      operationId: GETv3_invoices_{invoiceId}_discrepancyExtended
      consumes: []
      produces:
      - application/json
      - text/json
      parameters:
      - name: invoiceId
        in: path
        description: Invoice identifier.
        required: true
        type: integer
        format: int32
      responses:
        '200':
          description: Indicates that the request succeeded and that the requested information is in the response.
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.InvoiceDiscrepancy'
        '400':
          description: Bad Request - the request could not be understood or was missing required parameters.
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.InvoiceDiscrepancy'
        '401':
          description: "Indicates that the requested resource requires authentication.\r\n            <br/>Error codes:\r\n            <br/> 504 - API call rejected by security permissions;"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '404':
          description: Indicates that the requested resource does not exist on the server.
      deprecated: false
      x-access: Any
  /invoices/{invoiceId}/Payment:
    post:
      tags:
      - Invoices
      summary: Add a payment to an invoice
      description: "Creates a payment record for the specified invoice in the *Approved* status.\r\n            <br />Send this request [GET/odata/invoices](/swagger/ui/index?version=3#/Invoices/Invoices_GetInvoices) to get the invoice ID.\r\n            <br />Learn [how subscribers can mark invoices as paid](https://servicechannel.atlassian.net/wiki/spaces/SCU/pages/621936646/Marking+Invoices+as+Paid) in ServiceChannel University.\r\n            <br />**Example Request**\r\n            \r\n                POST /invoices/{invoiceId}/Payment\r\n                {\r\n                 \"PaymentDate\": \"2021-06-10T07:40:47.881Z\",\r\n                 \"PaymentNumber\": \"25469833\",\r\n                 \"PaymentAmount\": 850\r\n                }"
      operationId: POSTv3_invoices_{invoiceId}_Payment
      consumes:
      - application/json
      - text/json
      produces: []
      parameters:
      - name: invoiceId
        in: path
        description: Unique numeric identifier of the invoice to add a payment to.
        required: true
        type: integer
        format: int32
      - name: payment
        in: body
        description: Request to add a payment to the specified invoice.
        required: true
        schema:
          $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.InvoicePaymentRequest'
      responses:
        '204':
          description: 'A payment record is added to the specified invoice. '
        '400':
          description: "The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.\r\n            <br/> Error codes:\r\n            503 - Request is invalid\r\n            1178 - Invoice cannot be paid before invoice dates\r\n            1178 - Invoice has already  paid\r\n            1178 - Only approved invoices may pay\r\n            1178 - Payment amount exceeds the actual amount\r\n            1178 - Payment amount should be more than zero\r\n            1178 - Pay not allowed for this subscriber"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "The request is not authorized.\r\n            <br/> Error codes:\r\n            504 - API call rejected by security permissions"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '403':
          description: "You are not authorized to request this resource, or the resource is unavailable for some reason.\r\n            <br/> Error codes:\r\n            100 - User has no rights to perform this action"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Subscribers
  /invoices/Payments:
    post:
      tags:
      - Invoices
      summary: Add payment records to invoices
      description: "Creates payment records for the invoices in the *Approved* status in bulk.\r\n             <br />**Note**: This method is available to users with the *Invoice Admin* role and with the *InvoiceChangeToPaid* feature flag enabled.\r\n             <br />**Example Request**\r\n             \r\n                 POST /invoices/Payments\r\n                 {\r\n                   \"Payments\": [\r\n                     {\r\n                       \"InvoiceId\": 96814318,\r\n                       \"PaymentDate\": \"2021-12-13T06:12:22.820Z\",\r\n                       \"PaymentNumber\": \"456858\",\r\n                       \"PaymentAmount\": 756\r\n                     },\r\n                     {\r\n                       \"InvoiceId\": 4988659,\r\n                       \"PaymentDate\": \"2021-12-13T06:12:22.820Z\",\r\n                       \"PaymentNumber\": \"97027818\",\r\n                       \"PaymentAmount\": 1250.55\r\n                     }  \r\n                   ]\r\n                 }"
      operationId: POSTv3_invoices_Payments
      consumes:
      - application/json
      - text/json
      produces:
      - application/json
      - text/json
      parameters:
      - name: request
        in: body
        description: Request model to add payment records in bulk.
        required: true
        schema:
          $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.InvoicePaymentBulkRequest'
      responses:
        '201':
          description: "The payments are successfully added.\r\n            <br/>Error codes:\r\n            503 - Request is invalid\r\n            1178 - Invoice cannot be paid before the invoice creation date\r\n            1178 - Invoice has already been paid\r\n            1178 - No invoice ID\r\n            1178 - Only approved invoices may be paid\r\n            1178 - Payment amount exceeds the actual invoice amount\r\n            1178 - Payment amount should be more than zero\r\n            1178 - Payment is not allowed for this subscriber\r\n            1178 - Payment number cannot exceed 100 characters"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.InvoicePaymentBulkResponse'
        '400':
          description: "The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.\r\n            <br/>Error codes:\r\n            503 - Request is empty or null"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "The request is not authorized.\r\n            <br/>Error codes:\r\n            504 - API call rejected by security permissions"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '403':
          description: "You are not authorized to request this resource, or the resource is unavailable for some reason.\r\n            <br/>Error codes:\r\n            100 - User has no permissions to perform this action"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '500':
          description: "The server was unable to complete the request due to an internal error.\r\n            <br/>Error codes:\r\n            501 - Error updating invoices payments in bulk mode"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
      deprecated: false
      x-access: Subscribers
  /invoices/Workorders/{trackingNumber}/Payment:
    post:
      tags:
      - Invoices
      summary: Add a payment record to an invoice by a tracking number
      description: "Creates a payment record for the invoice in the *Approved* status by specifying the tracking number of the work order the invoice was created for.\r\n            <br />Learn [how subscribers can mark invoices as paid](https://servicechannel.atlassian.net/wiki/spaces/SCU/pages/621936646/Marking+Invoices+as+Paid) in ServiceChannel University."
      operationId: POSTv3_invoices_Workorders_{trackingNumber}_Payment
      consumes:
      - application/json
      - text/json
      produces: []
      parameters:
      - name: trackingNumber
        in: path
        description: Tracking number of the work order you want to add the invoice payment record for.
        required: true
        type: integer
        format: int32
      - name: payment
        in: body
        description: Invoice payment record request model.
        required: true
        schema:
          $ref: '#/definitions/ServiceChannel.Services.Messaging.Invoices.InvoicePaymentRequest'
      responses:
        '204':
          description: 'The payment record is added to a particular invoice created for the specified work order. '
        '400':
          description: "The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.\r\n            <br/> Error codes:\r\n            503 - Request is invalid\r\n            1178 - Invoice cannot be paid before invoice dates\r\n            1178 - Invoice has already  paid\r\n            1178 - Only approved invoices may pay\r\n            1178 - Payment amount exceeds the actual amount\r\n            1178 - Payment amount should be more than zero\r\n            1178 - Pay not allowed for this subscriber\r\n            2602 - Invalid WO Tracking Number"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'
        '401':
          description: "The request is not authorized.\r\n            <br/> Error codes:\r\n            504 - API call rejected by security permissions"
          schema:
            $ref: '#/definitions/ServiceChannel.Services.Messaging.ErrorResponse'


# --- truncated at 32 KB (183 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/servicechannel/refs/heads/main/openapi/servicechannel-invoices-api-openapi.yml