openapi: 3.1.0 info: title: SAP Sales and Distribution (SD) SAP Billing Document Credit Account 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 Account description: Operations on credit management accounts paths: /A_CrdtMgmtBusinessPartner: get: operationId: listCreditAccounts summary: Retrieve a list of credit management accounts description: Returns a collection of credit management business partner accounts with credit profile information. tags: - Credit Account parameters: - $ref: '#/components/parameters/top' - $ref: '#/components/parameters/skip' - $ref: '#/components/parameters/filter' - $ref: '#/components/parameters/select' - $ref: '#/components/parameters/expand' - $ref: '#/components/parameters/inlinecount' responses: '200': description: Successfully retrieved credit accounts content: application/json: schema: type: object properties: d: type: object properties: results: type: array items: $ref: '#/components/schemas/CrdtMgmtBusinessPartner' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalServerError' /A_CrdtMgmtBusinessPartner('{BusinessPartner}'): get: operationId: getCreditAccount summary: Retrieve a single credit management account description: Returns credit management data for a single business partner, including credit rating, risk class, and credit block status. tags: - Credit Account parameters: - name: BusinessPartner in: path required: true description: Business partner number schema: type: string maxLength: 10 - $ref: '#/components/parameters/select' - $ref: '#/components/parameters/expand' responses: '200': description: Successfully retrieved the credit account content: application/json: schema: type: object properties: d: $ref: '#/components/schemas/CrdtMgmtBusinessPartner' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError' patch: operationId: updateCreditAccount summary: Update a credit management account description: Updates credit management data for a business partner. tags: - Credit Account parameters: - name: BusinessPartner in: path required: true description: Business partner number schema: type: string maxLength: 10 - $ref: '#/components/parameters/ifMatch' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CrdtMgmtBusinessPartnerUpdate' responses: '204': description: Credit account successfully updated '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError' components: parameters: filter: name: $filter in: query schema: type: string 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 expand: name: $expand 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: CrdtMgmtBusinessPartnerUpdate: type: object properties: CreditRiskClass: type: string maxLength: 3 CreditRating: type: string maxLength: 3 CreditIsBlockedForBP: type: boolean Error: type: object properties: error: type: object properties: code: type: string message: type: object properties: lang: type: string value: type: string CrdtMgmtBusinessPartner: type: object description: Credit management business partner entity properties: BusinessPartner: type: string maxLength: 10 description: Business partner number CreditRiskClass: type: string maxLength: 3 description: Risk class CreditRating: type: string maxLength: 3 description: Credit rating CreditIsBlockedForBP: type: boolean description: Credit block indicator LastInternalReviewDate: type: string format: date description: Date of last internal review NextInternalReviewDate: type: string format: date description: Date of next internal review 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