SAP Sales and Distribution (SD) Credit Limit API

Operations on customer credit limits

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-schema/sap-sd-sales-order-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-schema/sap-sd-sales-order-item-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-structure/sap-sd-sales-order-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-schema/sap-sd-business-partner-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-schema/sap-sd-outbound-delivery-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-schema/sap-sd-billing-document-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-structure/sap-sd-billing-document-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-schema/sap-sd-pricing-condition-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-schema/sap-sd-product-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sap-sales-and-distribution-sd/refs/heads/main/json-schema/sap-sd-customer-return-schema.json

Other Resources

OpenAPI Specification

sap-sales-and-distribution-sd-credit-limit-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: SAP Sales and Distribution (SD) SAP Billing Document Credit Limit API
  description: Read, cancel, and retrieve billing documents in PDF format from SAP S/4HANA. This OData service (API_BILLING_DOCUMENT_SRV) provides access to billing document headers, items, partners, and pricing elements. Supports invoices, credit memos, debit memos, and other billing document types as part of the order-to-cash cycle.
  version: 1.0.0
  contact:
    name: SAP Support
    url: https://support.sap.com
  license:
    name: SAP Developer License
    url: https://www.sap.com/about/agreements/product-use-and-support-terms.html
servers:
- url: https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BILLING_DOCUMENT_SRV
  description: SAP S/4HANA Cloud Sandbox
- url: https://{host}:{port}/sap/opu/odata/sap/API_BILLING_DOCUMENT_SRV
  description: SAP S/4HANA On-Premise
  variables:
    host:
      default: localhost
    port:
      default: '443'
security:
- basicAuth: []
- oauth2: []
tags:
- name: Credit Limit
  description: Operations on customer credit limits
paths:
  /A_CrdtMgmtCreditLimit:
    get:
      operationId: listCreditLimits
      summary: Retrieve credit limits
      description: Returns a collection of credit limits for business partners across credit control areas and credit segments.
      tags:
      - Credit Limit
      parameters:
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/skip'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/select'
      - $ref: '#/components/parameters/inlinecount'
      responses:
        '200':
          description: Successfully retrieved credit limits
          content:
            application/json:
              schema:
                type: object
                properties:
                  d:
                    type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/CrdtMgmtCreditLimit'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /A_CrdtMgmtCreditLimit(BusinessPartner='{BusinessPartner}',CreditSegment='{CreditSegment}'):
    get:
      operationId: getCreditLimit
      summary: Retrieve a specific credit limit
      description: Returns credit limit data for a specific business partner and credit segment combination.
      tags:
      - Credit Limit
      parameters:
      - name: BusinessPartner
        in: path
        required: true
        description: Business partner number
        schema:
          type: string
          maxLength: 10
      - name: CreditSegment
        in: path
        required: true
        description: Credit segment
        schema:
          type: string
          maxLength: 4
      - $ref: '#/components/parameters/select'
      responses:
        '200':
          description: Successfully retrieved the credit limit
          content:
            application/json:
              schema:
                type: object
                properties:
                  d:
                    $ref: '#/components/schemas/CrdtMgmtCreditLimit'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    patch:
      operationId: updateCreditLimit
      summary: Update a credit limit
      description: Updates the credit limit for a specific business partner and credit segment.
      tags:
      - Credit Limit
      parameters:
      - name: BusinessPartner
        in: path
        required: true
        description: Business partner number
        schema:
          type: string
          maxLength: 10
      - name: CreditSegment
        in: path
        required: true
        description: Credit segment
        schema:
          type: string
          maxLength: 4
      - $ref: '#/components/parameters/ifMatch'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrdtMgmtCreditLimitUpdate'
      responses:
        '204':
          description: Credit limit successfully updated
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    skip:
      name: $skip
      in: query
      schema:
        type: integer
        minimum: 0
    select:
      name: $select
      in: query
      schema:
        type: string
    ifMatch:
      name: If-Match
      in: header
      required: true
      schema:
        type: string
    filter:
      name: $filter
      in: query
      schema:
        type: string
    top:
      name: $top
      in: query
      schema:
        type: integer
        minimum: 0
    inlinecount:
      name: $inlinecount
      in: query
      schema:
        type: string
        enum:
        - allpages
        - none
  responses:
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    CrdtMgmtCreditLimitUpdate:
      type: object
      properties:
        CreditLimitAmount:
          type: string
        CreditLimitAmountCurrency:
          type: string
          maxLength: 5
        CreditLimitValidityEndDate:
          type: string
          format: date
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: object
              properties:
                lang:
                  type: string
                value:
                  type: string
    CrdtMgmtCreditLimit:
      type: object
      description: Credit limit entity
      properties:
        BusinessPartner:
          type: string
          maxLength: 10
          description: Business partner number
        CreditSegment:
          type: string
          maxLength: 4
          description: Credit segment
        CreditLimitAmount:
          type: string
          description: Credit limit amount
        CreditLimitAmountCurrency:
          type: string
          maxLength: 5
          description: Credit limit currency
        CreditLimitValidityEndDate:
          type: string
          format: date
          description: Validity end date
        CreditLimitIsExceeded:
          type: boolean
          description: Indicates if credit limit is exceeded
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://{tenant}.authentication.{landscape}.hana.ondemand.com/oauth/token
          scopes:
            API_BILLING_DOCUMENT_SRV: Access to Billing Document API