Agicap Client Credit Notes API

The Client Credit Notes API from Agicap — 2 operation(s) for client credit notes.

OpenAPI Specification

agicap-client-credit-notes-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  contact: {}
  title: Clients AR Account reports Client Credit Notes API
  version: v1
servers:
- url: https://api.agicap.com
- url: https://api.agicap.internal
tags:
- name: Client Credit Notes
paths:
  /public/business-documents/v1/entities/{entityid}/connections/{connectionid}/client-credit-notes:
    get:
      operationId: ClientCreditNote_GetClientCreditNotes
      parameters:
      - description: Agicap entity unique identifier
        in: path
        name: entityid
        required: true
        schema:
          description: Agicap entity unique identifier
          type: string
      - description: The connection unique identifier
        in: path
        name: connectionid
        required: true
        schema:
          description: The connection unique identifier
          format: uuid
          type: string
      - description: Number of items per page (max 10 000)
        in: query
        name: pagesize
        schema:
          description: Number of items per page (max 10 000)
          format: int32
          type: integer
      - description: Page index
        in: query
        name: pageindex
        schema:
          description: Page index
          format: int32
          type: integer
      - description: 'Filter on status. Possible values : draft, available, used, cancelled, deleted'
        explode: false
        in: query
        name: status
        schema:
          description: 'Filter on status. Possible values : draft, available, used, cancelled, deleted'
          items:
            type: string
          type: array
        style: form
      - description: Unique identifier of the document in the data source
        explode: false
        in: query
        name: externalids
        schema:
          description: Unique identifier of the document in the data source
          items:
            type: string
          type: array
        style: form
      - description: Will return only documents updated **after** this date
        in: query
        name: updatedsince
        schema:
          description: Will return only documents updated **after** this date
          format: date-time
          type: string
      responses:
        '200':
          content:
            application/json:
              example:
                items:
                - accounting:
                    accountCode: Account code
                    accountNumber: Account number
                    amount: 100
                    currency: EUR
                  amounts:
                    remainingAmount: 80
                    taxesAmount: 20
                    totalAmount: 200
                  counterParty:
                    id: id
                    name: counter party name
                  creditNoteNumber: '00341001'
                  currency: EUR
                  dueDate: '2024-03-06T14:30:10+00:00'
                  erpIdentificationFields:
                    erp field 1: value 1
                    erp field 2: value 2
                  externalId: Some External Id
                  hasReadable: false
                  id: d062b351-99ac-413a-9bf9-509498499a18
                  issueDate: '2024-02-06T14:30:10+00:00'
                  label: client credit note label
                  metadata:
                    additional field: additional info
                  referenceInvoiceIds:
                  - reference invoice id 1
                  - reference invoice id 2
                  status: available
                pagination:
                  pageIndex: 1
                  pageItemsCount: 7
                  pageSize: 10
                  totalItemsCount: 7
              schema:
                $ref: '#/components/schemas/ClientCreditNoteDtoPageDto'
          description: Client credit notes
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                properties:
                  detail:
                    description: Details of the error
                    nullable: true
                    type: string
                  instance:
                    nullable: true
                    type: string
                  status:
                    description: Code status
                    nullable: true
                    type: integer
                  title:
                    description: Name of the error
                    nullable: true
                    type: string
                  type:
                    description: Type of error
                    nullable: true
                    type: string
                type: object
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Get client credit notes
      tags:
      - Client Credit Notes
    post:
      operationId: ClientCreditNote_CreateClientCreditNotes
      parameters:
      - description: Agicap entity unique identifier
        in: path
        name: entityid
        required: true
        schema:
          description: Agicap entity unique identifier
          type: string
      - description: The connection unique identifier
        in: path
        name: connectionid
        required: true
        schema:
          description: The connection unique identifier
          format: uuid
          type: string
      requestBody:
        content:
          application/*+json:
            example:
            - accounting:
                accountCode: Account code
                accountNumber: Account number
                amount: 100
                currency: EUR
              amounts:
                remainingAmount: 80
                taxesAmount: 20
                totalAmount: 200
              counterParty:
                id: id
                name: counter party name
              creditNoteNumber: '00341001'
              currency: EUR
              dueDate: '2024-03-06T14:30:10+00:00'
              erpIdentificationFields:
                erp field 1: value 1
                erp field 2: value 2
              externalId: Some External Id
              issueDate: '2024-02-06T14:30:10+00:00'
              label: client credit note label
              metadata:
                additional field: additional info
              referenceInvoiceIds:
              - reference invoice id 1
              - reference invoice id 2
              status: available
            schema:
              items:
                $ref: '#/components/schemas/CreateClientCreditNoteDto'
              type: array
          application/json:
            example:
            - accounting:
                accountCode: Account code
                accountNumber: Account number
                amount: 100
                currency: EUR
              amounts:
                remainingAmount: 80
                taxesAmount: 20
                totalAmount: 200
              counterParty:
                id: id
                name: counter party name
              creditNoteNumber: '00341001'
              currency: EUR
              dueDate: '2024-03-06T14:30:10+00:00'
              erpIdentificationFields:
                erp field 1: value 1
                erp field 2: value 2
              externalId: Some External Id
              issueDate: '2024-02-06T14:30:10+00:00'
              label: client credit note label
              metadata:
                additional field: additional info
              referenceInvoiceIds:
              - reference invoice id 1
              - reference invoice id 2
              status: available
            schema:
              items:
                $ref: '#/components/schemas/CreateClientCreditNoteDto'
              type: array
          text/json:
            example:
            - accounting:
                accountCode: Account code
                accountNumber: Account number
                amount: 100
                currency: EUR
              amounts:
                remainingAmount: 80
                taxesAmount: 20
                totalAmount: 200
              counterParty:
                id: id
                name: counter party name
              creditNoteNumber: '00341001'
              currency: EUR
              dueDate: '2024-03-06T14:30:10+00:00'
              erpIdentificationFields:
                erp field 1: value 1
                erp field 2: value 2
              externalId: Some External Id
              issueDate: '2024-02-06T14:30:10+00:00'
              label: client credit note label
              metadata:
                additional field: additional info
              referenceInvoiceIds:
              - reference invoice id 1
              - reference invoice id 2
              status: available
            schema:
              items:
                $ref: '#/components/schemas/CreateClientCreditNoteDto'
              type: array
      responses:
        '201':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CreatedDocumentDto'
                type: array
          description: Ids of the created documents, associated with the provided external identifiers
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                properties:
                  detail:
                    description: Details of the error
                    nullable: true
                    type: string
                  instance:
                    nullable: true
                    type: string
                  status:
                    description: Code status
                    nullable: true
                    type: integer
                  title:
                    description: Name of the error
                    nullable: true
                    type: string
                  type:
                    description: Type of error
                    nullable: true
                    type: string
                type: object
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Create client credit notes
      tags:
      - Client Credit Notes
    put:
      operationId: ClientCreditNote_UpdateClientCreditNotes
      parameters:
      - description: Agicap entity unique identifier
        in: path
        name: entityid
        required: true
        schema:
          description: Agicap entity unique identifier
          type: string
      - description: The connection unique identifier
        in: path
        name: connectionid
        required: true
        schema:
          description: The connection unique identifier
          format: uuid
          type: string
      requestBody:
        content:
          application/*+json:
            schema:
              items:
                $ref: '#/components/schemas/UpdateClientCreditNoteDto'
              type: array
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/UpdateClientCreditNoteDto'
              type: array
          text/json:
            schema:
              items:
                $ref: '#/components/schemas/UpdateClientCreditNoteDto'
              type: array
      responses:
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                properties:
                  detail:
                    description: Details of the error
                    nullable: true
                    type: string
                  instance:
                    nullable: true
                    type: string
                  status:
                    description: Code status
                    nullable: true
                    type: integer
                  title:
                    description: Name of the error
                    nullable: true
                    type: string
                  type:
                    description: Type of error
                    nullable: true
                    type: string
                type: object
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Update client credit notes
      tags:
      - Client Credit Notes
  /public/business-documents/v2/entities/{entityid}/connections/{connectionid}/client-credit-notes:
    get:
      operationId: ClientCreditNote_GetClientCreditNotes
      parameters:
      - description: Agicap entity unique identifier
        in: path
        name: entityid
        required: true
        schema:
          description: Agicap entity unique identifier
          type: string
      - description: The connection unique identifier
        in: path
        name: connectionid
        required: true
        schema:
          description: The connection unique identifier
          format: uuid
          type: string
      - description: Number of items per page (max 10 000)
        in: query
        name: pagesize
        schema:
          description: Number of items per page (max 10 000)
          format: int32
          type: integer
      - description: Page index
        in: query
        name: pageindex
        schema:
          description: Page index
          format: int32
          type: integer
      - description: 'Filter on status. Possible values : draft, available, used, cancelled, deleted'
        explode: false
        in: query
        name: status
        schema:
          description: 'Filter on status. Possible values : draft, available, used, cancelled, deleted'
          items:
            type: string
          type: array
        style: form
      - description: Unique identifier of the document in the data source
        explode: false
        in: query
        name: externalids
        schema:
          description: Unique identifier of the document in the data source
          items:
            type: string
          type: array
        style: form
      - description: Will return only documents updated **after** this date
        in: query
        name: updatedsince
        schema:
          description: Will return only documents updated **after** this date
          format: date-time
          type: string
      responses:
        '200':
          content:
            application/json:
              example:
                items:
                - accounting:
                    accountCode: Account code
                    accountNumber: Account number
                    amount: 100
                    currency: EUR
                  amounts:
                    remainingAmount: 80
                    taxesAmount: 20
                    totalAmount: 200
                  counterParty:
                    id: id
                    name: counter party name
                  creditNoteNumber: '00341001'
                  currency: EUR
                  dueDate: '2024-03-06T14:30:10+00:00'
                  erpIdentificationFields:
                    erp field 1: value 1
                    erp field 2: value 2
                  externalId: Some External Id
                  hasReadable: false
                  id: d062b351-99ac-413a-9bf9-509498499a18
                  issueDate: '2024-02-06T14:30:10+00:00'
                  label: client credit note label
                  metadata:
                    additional field: additional info
                  referenceInvoiceIds:
                  - reference invoice id 1
                  - reference invoice id 2
                  status: available
                pagination:
                  pageIndex: 1
                  pageItemsCount: 7
                  pageSize: 10
                  totalItemsCount: 7
              schema:
                $ref: '#/components/schemas/ClientCreditNoteDtoPageDto'
          description: Client credit notes
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                properties:
                  detail:
                    description: Details of the error
                    nullable: true
                    type: string
                  instance:
                    nullable: true
                    type: string
                  status:
                    description: Code status
                    nullable: true
                    type: integer
                  title:
                    description: Name of the error
                    nullable: true
                    type: string
                  type:
                    description: Type of error
                    nullable: true
                    type: string
                type: object
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Get client credit notes
      tags:
      - Client Credit Notes
    post:
      operationId: ClientCreditNote_CreateClientCreditNotesV2
      parameters:
      - description: Agicap entity unique identifier
        in: path
        name: entityid
        required: true
        schema:
          description: Agicap entity unique identifier
          type: string
      - description: The connection unique identifier
        in: path
        name: connectionid
        required: true
        schema:
          description: The connection unique identifier
          format: uuid
          type: string
      requestBody:
        content:
          application/*+json:
            example:
            - accounting:
                accountCode: Account code
                accountNumber: Account number
                amount: 100
                currency: EUR
              amounts:
                remainingAmount: 80
                taxesAmount: 20
                totalAmount: 200
              counterParty:
                id: id
                name: counter party name
              creditNoteNumber: '00341001'
              currency: EUR
              dueDate: '2024-03-06T14:30:10+00:00'
              erpIdentificationFields:
                erp field 1: value 1
                erp field 2: value 2
              externalId: Some External Id
              issueDate: '2024-02-06T14:30:10+00:00'
              label: client credit note label
              metadata:
                additional field: additional info
              referenceInvoiceIds:
              - reference invoice id 1
              - reference invoice id 2
              status: available
            schema:
              items:
                $ref: '#/components/schemas/CreateClientCreditNoteDtoV2'
              type: array
          application/json:
            example:
            - accounting:
                accountCode: Account code
                accountNumber: Account number
                amount: 100
                currency: EUR
              amounts:
                remainingAmount: 80
                taxesAmount: 20
                totalAmount: 200
              counterParty:
                id: id
                name: counter party name
              creditNoteNumber: '00341001'
              currency: EUR
              dueDate: '2024-03-06T14:30:10+00:00'
              erpIdentificationFields:
                erp field 1: value 1
                erp field 2: value 2
              externalId: Some External Id
              issueDate: '2024-02-06T14:30:10+00:00'
              label: client credit note label
              metadata:
                additional field: additional info
              referenceInvoiceIds:
              - reference invoice id 1
              - reference invoice id 2
              status: available
            schema:
              items:
                $ref: '#/components/schemas/CreateClientCreditNoteDtoV2'
              type: array
          text/json:
            example:
            - accounting:
                accountCode: Account code
                accountNumber: Account number
                amount: 100
                currency: EUR
              amounts:
                remainingAmount: 80
                taxesAmount: 20
                totalAmount: 200
              counterParty:
                id: id
                name: counter party name
              creditNoteNumber: '00341001'
              currency: EUR
              dueDate: '2024-03-06T14:30:10+00:00'
              erpIdentificationFields:
                erp field 1: value 1
                erp field 2: value 2
              externalId: Some External Id
              issueDate: '2024-02-06T14:30:10+00:00'
              label: client credit note label
              metadata:
                additional field: additional info
              referenceInvoiceIds:
              - reference invoice id 1
              - reference invoice id 2
              status: available
            schema:
              items:
                $ref: '#/components/schemas/CreateClientCreditNoteDtoV2'
              type: array
      responses:
        '201':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/CreatedDocumentDto'
                type: array
          description: Ids of the created documents, associated with the provided external identifiers
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                properties:
                  detail:
                    description: Details of the error
                    nullable: true
                    type: string
                  instance:
                    nullable: true
                    type: string
                  status:
                    description: Code status
                    nullable: true
                    type: integer
                  title:
                    description: Name of the error
                    nullable: true
                    type: string
                  type:
                    description: Type of error
                    nullable: true
                    type: string
                type: object
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Create client credit notes
      tags:
      - Client Credit Notes
    put:
      operationId: ClientCreditNote_UpdateClientCreditNotesV2
      parameters:
      - description: Agicap entity unique identifier
        in: path
        name: entityid
        required: true
        schema:
          description: Agicap entity unique identifier
          type: string
      - description: The connection unique identifier
        in: path
        name: connectionid
        required: true
        schema:
          description: The connection unique identifier
          format: uuid
          type: string
      requestBody:
        content:
          application/*+json:
            example:
            - accounting:
                accountCode: Account code
                accountNumber: Account number
                amount: 100
                currency: EUR
              amounts:
                remainingAmount: 80
                taxesAmount: 20
                totalAmount: 200
              counterParty:
                id: id
                name: counter party name
              creditNoteNumber: '00341001'
              currency: EUR
              dueDate: '2024-03-06T14:30:10+00:00'
              erpIdentificationFields:
                erp field 1: value 1
                erp field 2: value 2
              externalId: Some External Id
              id: d062b351-99ac-413a-9bf9-509498499a18
              issueDate: '2024-02-06T14:30:10+00:00'
              label: client credit note label
              metadata:
                additional field: additional info
              referenceInvoiceIds:
              - reference invoice id 1
              - reference invoice id 2
              status: available
            schema:
              items:
                $ref: '#/components/schemas/UpdateClientCreditNoteDtoV2'
              type: array
          application/json:
            example:
            - accounting:
                accountCode: Account code
                accountNumber: Account number
                amount: 100
                currency: EUR
              amounts:
                remainingAmount: 80
                taxesAmount: 20
                totalAmount: 200
              counterParty:
                id: id
                name: counter party name
              creditNoteNumber: '00341001'
              currency: EUR
              dueDate: '2024-03-06T14:30:10+00:00'
              erpIdentificationFields:
                erp field 1: value 1
                erp field 2: value 2
              externalId: Some External Id
              id: d062b351-99ac-413a-9bf9-509498499a18
              issueDate: '2024-02-06T14:30:10+00:00'
              label: client credit note label
              metadata:
                additional field: additional info
              referenceInvoiceIds:
              - reference invoice id 1
              - reference invoice id 2
              status: available
            schema:
              items:
                $ref: '#/components/schemas/UpdateClientCreditNoteDtoV2'
              type: array
          text/json:
            example:
            - accounting:
                accountCode: Account code
                accountNumber: Account number
                amount: 100
                currency: EUR
              amounts:
                remainingAmount: 80
                taxesAmount: 20
                totalAmount: 200
              counterParty:
                id: id
                name: counter party name
              creditNoteNumber: '00341001'
              currency: EUR
              dueDate: '2024-03-06T14:30:10+00:00'
              erpIdentificationFields:
                erp field 1: value 1
                erp field 2: value 2
              externalId: Some External Id
              id: d062b351-99ac-413a-9bf9-509498499a18
              issueDate: '2024-02-06T14:30:10+00:00'
              label: client credit note label
              metadata:
                additional field: additional info
              referenceInvoiceIds:
              - reference invoice id 1
              - reference invoice id 2
              status: available
            schema:
              items:
                $ref: '#/components/schemas/UpdateClientCreditNoteDtoV2'
              type: array
      responses:
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                properties:
                  detail:
                    description: Details of the error
                    nullable: true
                    type: string
                  instance:
                    nullable: true
                    type: string
                  status:
                    description: Code status
                    nullable: true
                    type: integer
                  title:
                    description: Name of the error
                    nullable: true
                    type: string
                  type:
                    description: Type of error
                    nullable: true
                    type: string
                type: object
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Update client credit notes
      tags:
      - Client Credit Notes
components:
  schemas:
    CreateClientCreditNoteDto:
      additionalProperties: false
      properties:
        accounting:
          $ref: '#/components/schemas/AccountingDto'
        amounts:
          $ref: '#/components/schemas/AmountsWithRemainingAmountDto'
        counterParty:
          $ref: '#/components/schemas/CounterPartyDto'
        creditNoteNumber:
          description: Document number in the source data
          nullable: true
          type: string
        currency:
          description: Currency code in ISO 4217 format
          minLength: 1
          type: string
        dueDate:
          description: Due date in ISO 8601 format
          format: date-time
          nullable: true
          type: string
        erpIdentificationFields:
          additionalProperties:
            type: string
          nullable: true
          type: object
        externalId:
          description: Unique identifier of the document in the source data
          minLength: 1
          type: string
        issueDate:
          description: Issue date in ISO 8601 format
          format: date-time
          nullable: true
          type: string
        label:
          description: Label of the client credit note
          nullable: true
          type: string
        metadata:
          additionalProperties:
            type: string
          description: Additional metadata as a JSON Object
          nullable: true
          type: object
        referenceInvoiceIds:
          description: Array of linked Agicap Invoices ids
          items:
            type: string
          nullable: true
          type: array
        status:
          description: 'Possible values : draft, available, used, cancelled, deleted'
          minLength: 1
          type: string
      required:
      - amounts
      - currency
      - externalId
      - status
      type: object
    ClientCreditNoteDtoPageDto:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/ClientCreditNoteDto'
          type: array
        pagination:
          $ref: '#/components/schemas/PaginationMetadataDto'
      title: Page
      type: object
    AmountsWithRemainingAmountDtoV2:
      additionalProperties: false
      properties:
        remainingAmount:
          description: Remaining amount in the document currency. (amount must be positive)
          format: double
          type: number
        taxesAmount:
          description: Taxes amount in the document currency (amount must be positive)
          format: double
          type: number
        totalAmount:
          description: Total amount in the document currency. (amount must be positive)
          format: double
          type: number
      required:
      - remainingAmount
      - taxesAmount
      - totalAmount
      title: AmountsWithRemainingAmount
      type: object
    CreatedDocumentDto:
      additionalProperties: false
      properties:
        externalId:
          type: string
        id:
          format: uuid
          type: string
      title: CreatedDocument
      type: object
    AmountsWithRemainingAmountDto:
      additionalProperties: false
      properties:
        remainingAmount:
          description: Remaining amount in the

# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/agicap/refs/heads/main/openapi/agicap-client-credit-notes-api-openapi.yml