AppDirect Reconciliation API

The Reconciliation API from AppDirect — 1 operation(s) for reconciliation.

OpenAPI Specification

appdirect-reconciliation-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: The Companies API allows developers to manage marketplace companies and their user memberships.
  title: Companies AI Embed Reconciliation API
  license:
    name: Apache License, Version 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: Reconciliation
  x-displayName: Reconciliation
paths:
  /v3/reconciliation/ledgerLines:
    get:
      description: Retrieve ledger lines generated for a specific role. Example, retrieve all ledger lines that a reseller manager has against all resellers
      tags:
      - Reconciliation
      summary: Retrieve ledger lines
      operationId: getLedgerLineDetails
      parameters:
      - description: Currently only supported value is 'RESELLER_MANAGER'
        name: context
        in: query
        required: true
        schema:
          type: string
          enum:
          - RESELLER_MANAGER
      - description: Page number to be returned in the result. Default value is 1
        name: page
        in: query
        required: false
        schema:
          type: integer
      - description: Size of the page to be returned. Default value is 50, maximum allowed is 250
        name: size
        in: query
        required: false
        schema:
          type: integer
      - description: Sorting is done against 'reconciliationDate'. Defaults to sorting in ascending order
        name: sortOrder
        in: query
        required: false
        schema:
          type: string
          enum:
          - ASC
          - DESC
      - description: Filters ledger lines from given date. Filtering is performed against the reconciliation date of the ledger line. The parameter represents milliseconds since epoch date, but only the date part is taken into account. The time component is ignored
        name: fromDate
        in: query
        required: false
        schema:
          type: number
      - description: Filters ledger lines until given date. Filtering is performed against the reconciliation date of the ledger line. The parameter represents milliseconds since epoch date, but only the date part is taken into account. The time component is ignored
        name: toDate
        in: query
        required: false
        schema:
          type: number
      - description: Filters by ledger line reconciliation type
        name: reconciliationType
        in: query
        required: false
        schema:
          type: string
          enum:
          - ITEM
          - TAX
          - DISCOUNT
          - TERMINATION_FEE
          - ADJUSTMENT
          - RESELLER_MARKUP
          - CHANNEL_MARKUP
          - APPDIRECT_FEE
      - description: Filters by ledger line operation type
        name: operationType
        in: query
        required: false
        schema:
          type: string
          enum:
          - CREDIT
          - DEBIT
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedLedgerLineDetailsWS'
              examples:
                response:
                  value:
                    links: []
                    content:
                    - id: 6
                      currency: JPY
                      amount: 10
                      customer:
                        id: 4712
                        username: enduser003@appdirect.com
                        email: enduser003@appdirect.com
                        uuid: 62c8b934-aca8-4ed2-bcd5-8f798fd19355
                      issuerParty:
                        id: RESELLERSMARKETPLACE
                        uuid: 5d08ea40-c948-40e2-9335-1f3c513a6524
                        type: CHANNEL
                        name: RESELLER MARKETPLACE
                      recipientParty:
                        id: '4052'
                        uuid: d282c59d-129a-4281-b390-a7d61876d9ce
                        type: RESELLER
                        name: Reseller Company 02
                      type: DEBIT
                      transferStatus: OPEN
                      reconciliationType: ITEM
                      reconciliationDate: 1506083747000
                      createdOn: 1506083752000
                      lastModified: 1506083752000
                      payments:
                      - id: 5881
                        type: MANUAL
                      invoiceId: 8568
                      orderId: 3598
                      productId: 3402
                      productName: TEST
                      editionId: 7552
                      editionName: Recurring Edition
                      editionPricingItemId: 14467
                      lineItemDescription: TEST - Recurring Edition - Monthly Fee Period from 09/22/17 to 10/22/17
                      lineItemType: ITEM
                    - id: 5
                      currency: JPY
                      amount: 10
                      customer:
                        id: 4712
                        username: enduser003@appdirect.com
                        email: enduser003@appdirect.com
                        uuid: 62c8b934-aca8-4ed2-bcd5-8f798fd19355
                      issuerParty:
                        id: '4052'
                        uuid: d282c59d-129a-4281-b390-a7d61876d9ce
                        type: RESELLER
                        name: Reseller Company 02
                      recipientParty:
                        id: RESELLERSMARKETPLACE
                        uuid: 5d08ea40-c948-40e2-9335-1f3c513a6524
                        type: CHANNEL
                        name: RESELLER MARKETPLACE
                      type: CREDIT
                      transferStatus: OPEN
                      reconciliationType: ITEM
                      reconciliationDate: 1506083747000
                      createdOn: 1506083752000
                      lastModified: 1506083752000
                      payments:
                      - id: 5881
                        type: MANUAL
                      invoiceId: 8568
                      invoiceLineId: 8569
                      orderId: 3598
                      productId: 3402
                      productName: TEST
                      editionId: 7552
                      editionName: Recurring Edition
                      editionPricingItemId: 14467
                      lineItemDescription: TEST - Recurring Edition - Monthly Fee Period from 09/22/17 to 10/22/17
                      lineItemType: ITEM
                    page:
                      size: 50
                      totalElements: 2
                      totalPages: 1
                      number: 1
        '400':
          description: Bad Request, typically bad query parameters
        '401':
          description: Invalid authentication
        '403':
          description: Invalid authorization
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request GET \\\n  --url 'https://marketplace.appdirect.com/api/v3/reconciliation/ledgerLines?context=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&sortOrder=SOME_STRING_VALUE&fromDate=SOME_NUMBER_VALUE&toDate=SOME_NUMBER_VALUE&reconciliationType=SOME_STRING_VALUE&operationType=SOME_STRING_VALUE'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://marketplace.appdirect.com/api/v3/reconciliation/ledgerLines',\n  qs: {\n    context: 'SOME_STRING_VALUE',\n    page: 'SOME_INTEGER_VALUE',\n    size: 'SOME_INTEGER_VALUE',\n    sortOrder: 'SOME_STRING_VALUE',\n    fromDate: 'SOME_NUMBER_VALUE',\n    toDate: 'SOME_NUMBER_VALUE',\n    reconciliationType: 'SOME_STRING_VALUE',\n    operationType: 'SOME_STRING_VALUE'\n  }\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/v3/reconciliation/ledgerLines?context=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&sortOrder=SOME_STRING_VALUE&fromDate=SOME_NUMBER_VALUE&toDate=SOME_NUMBER_VALUE&reconciliationType=SOME_STRING_VALUE&operationType=SOME_STRING_VALUE\")\n  .get()\n  .build();\n\nResponse response = client.newCall(request).execute();"
components:
  schemas:
    PagedResources:
      allOf:
      - $ref: '#/components/schemas/ResourceSupport'
      - title: PagedResources
        type: object
        properties:
          page:
            $ref: '#/components/schemas/PageMetadata'
    PaymentMethod:
      type: string
      description: The supported payment methods
      title: PaymentMethod
      enum:
      - CREDIT_CARD
      - PAYPAL
      - MANUAL
      - EXTERNAL_INVOICE
      - MARKETPLACE_CREDITS
    PaymentIdAndTypeWS:
      type: object
      title: PaymentIdAndType
      properties:
        id:
          description: Payment ID
          type: number
          nullable: true
        type:
          $ref: '#/components/schemas/PaymentMethod'
      example:
        id: 123554
        type: CREDIT_CARD
      nullable: true
    LedgerLineDetailsWS:
      type: object
      title: LedgerLineDetails
      properties:
        id:
          description: Ledger line ID
          type: number
          nullable: true
        currency:
          $ref: '#/components/schemas/Currency'
        amount:
          description: Ledger line amount. Decimal value
          type: number
          nullable: true
        customer:
          $ref: '#/components/schemas/CustomerWS'
        issuerParty:
          $ref: '#/components/schemas/PartyWS'
        recipientParty:
          $ref: '#/components/schemas/PartyWS'
        type:
          $ref: '#/components/schemas/LedgerLineOperationType'
        transferId:
          description: Transfer ID
          type: number
          nullable: true
        transferStatus:
          $ref: '#/components/schemas/TransferStatus'
        reconciliationType:
          $ref: '#/components/schemas/ReconciliationType'
        reconciliationDate:
          description: Reconciliation date
          type: number
          nullable: true
        createdOn:
          description: Ledger line created on date
          type: number
          nullable: true
        lastModified:
          description: Ledger line last modified
          type: number
          nullable: true
        payments:
          description: Payments made against the invoice that generated this ledger line
          type: array
          items:
            $ref: '#/components/schemas/PaymentIdAndTypeWS'
        invoiceId:
          description: Invoice ID
          type: number
          nullable: true
        invoiceLineId:
          description: Invoice Line ID
          type: number
          nullable: true
        orderId:
          description: The purchase order ID related to the invoice that triggered this ledger line
          type: number
          nullable: true
        productId:
          description: The product ID that was sold and triggered the creation of the ledger line
          type: number
          nullable: true
        productName:
          description: The product name that was sold and triggered the creation of the ledger line
          type: string
          nullable: true
        editionId:
          description: Application edition ID
          type: number
          nullable: true
        editionName:
          description: Application edition name
          type: string
          nullable: true
        editionPricingItemId:
          description: Edition pricing item ID
          type: number
          nullable: true
        lineItemDescription:
          description: Item line description
          type: string
          nullable: true
        lineItemType:
          $ref: '#/components/schemas/InvoiceLineTypeWS'
      example:
        id: 6
        currency: JPY
        amount: 10
        customer:
          id: 4712
          username: enduser003@appdirect.com
          email: enduser003@appdirect.com
          uuid: 62c8b934-aca8-4ed2-bcd5-8f798fd19355
        issuerParty:
          id: RESELLERSMARKETPLACE
          uuid: 5d08ea40-c948-40e2-9335-1f3c513a6524
          type: CHANNEL
          name: RESELLER MARKETPLACE
        recipientParty:
          id: '4052'
          uuid: d282c59d-129a-4281-b390-a7d61876d9ce
          type: RESELLER
          name: Reseller Company 02
        type: DEBIT
        transferStatus: OPEN
        reconciliationType: ITEM
        reconciliationDate: 1506083747000
        createdOn: 1506083752000
        lastModified: 1506083752000
        payments:
        - id: 5881
          type: MANUAL
        invoiceId: 8568
        invoiceLineId: 8569
        orderId: 3598
        productId: 3402
        productName: TEST
        editionId: 7552
        editionName: Recurring Edition
        editionPricingItemId: 14467
        lineItemDescription: TEST - Recurring Edition - Monthly Fee Period from 09/22/17 to 10/22/17
        lineItemType: ITEM
      nullable: true
    ReconciliationType:
      type: string
      title: ReconciliationType
      enum:
      - ITEM
      - TAX
      - DISCOUNT
      - TERMINATION_FEE
      - ADJUSTMENT
      - RESELLER_MARKUP
      - CHANNEL_MARKUP
      - APPDIRECT_FEE
    TransferStatus:
      type: string
      title: TransferStatus
      enum:
      - OPEN
      - PENDING
      - RECONCILED
    LedgerLineOperationType:
      type: string
      title: LedgerLineOperationType
      enum:
      - CREDIT
      - DEBIT
    InvoiceLineTypeWS:
      type: string
      title: InvoiceLineType
      enum:
      - ITEM
      - DISCOUNT
      - TAX
      - DELEGATED_INVOICE
      - TERMINATION_FEE
      - SUB_ACCOUNT
      nullable: true
    Link:
      type: object
      title: Link
      properties:
        href:
          type: string
        rel:
          type: string
      example:
        href: '...'
        rel: '...'
      nullable: true
    PagedLedgerLineDetailsWS:
      allOf:
      - $ref: '#/components/schemas/PagedResources'
      - description: Represents a paged collection of LedgerLineDetailsWS
        title: PagedLedgerLineDetailsWS
        type: object
        properties:
          content:
            type: array
            items:
              $ref: '#/components/schemas/LedgerLineDetailsWS'
    ResourceSupport:
      type: object
      title: ResourceSupport
      description: Resource links
      properties:
        links:
          type: array
          description: Resource links
          items:
            $ref: '#/components/schemas/Link'
      example:
        links:
        - href: '...'
          rel: '...'
        - href: '...'
          rel: '...'
      nullable: true
    CustomerWS:
      type: object
      title: Customer
      properties:
        id:
          description: Customer ID
          type: number
          nullable: true
        uuid:
          description: Customer UUID
          type: string
          nullable: true
        username:
          description: Customer username
          type: string
          nullable: true
        email:
          description: Customer email
          type: string
          nullable: true
      example:
        id: 12345
        uuid: 4d6c8f8e-d05a-11e7-abc4-cec278b6b50a
        username: customer@example.com
        email: customer@example.com
      nullable: true
    Currency:
      description: Supported currencies for the system
      type: string
      title: Currency
      enum:
      - USD
      - CAD
      - EUR
      - JPY
      - GBP
      - KRW
      - CHF
      - SEK
      - SGD
      - MYR
      - AUD
      - MXN
      - INR
      - BRL
      - DKK
      - NZD
      - NOK
      - ZAR
      - PHP
      - CNY
      - SAR
      - GTQ
      - IDR
      - ARS
      - COP
      - PEN
      default: USD
    PageMetadata:
      type: object
      title: PageMetadata
      required:
      - number
      - size
      - totalElements
      - totalPages
      properties:
        number:
          description: Page number
          type: number
        size:
          description: Size of the page to be returned
          type: number
        totalElements:
          description: Total number of elements
          type: number
        totalPages:
          description: Total number of pages
          type: number
      example:
        number: 12345
        size: 12345
        totalElements: 12345
        totalPages: 12345
    PartyWS:
      type: object
      title: Party
      properties:
        id:
          description: Party ID, if one is available for this party type
          type: string
          nullable: true
        uuid:
          description: Party UUID, if one is available for this party type
          type: string
          nullable: true
        type:
          enum:
          - CUSTOMER
          - RESELLER
          - CHANNEL
          - VENDOR
          - APPDIRECT
          description: Party type
          type: string
          nullable: true
        name:
          description: Party name
          type: string
          nullable: true
        email:
          description: Party email
          type: string
          nullable: true
      example:
        id: 12355
        uuid: 7c840533-8e16-4f98-8c71-4e2544d59258
        type: CUSTOMER
        name: John Snow
        email: john.snow@got.com
      nullable: true