# sap-samples/byd-api-samples architecture

> Architecture diagram of the GitHub repository sap-samples/byd-api-samples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sap-samples/byd-api-samples
- Repository: https://github.com/sap-samples/byd-api-samples

## Overview

1. This repository is not an application runtime; it is a sample asset pack for SAP Business ByDesign integration testing and learning. The two main artifact types are Postman collections/environments and SAP ByDesign Custom OData Service definitions.

2. The external system boundary is SAP Business ByDesign. All request flows target ByD OData APIs exposed by a tenant, typically a partner demo tenant or another configured ByD system. The repository itself contains no server-side code or executable service.

3. The `Postman/` folder is the primary client-side layer. Each `.postman_collection.json` defines a scenario-driven request sequence, and each matching `.postman_environment.json` supplies tenant URL, business user credentials, communication user credentials, and test data variables.

4. The collections are organized by business domain rather than technical layer: Analytics, Master Data, Reference Scenarios, Projects, Sales and Commerce Scenarios, Internal Logistics, New Business, and Supplier Invoicing. Each collection models a business process and uses ordered OData calls to create, change, read, and sometimes chain documents across that process.

5. The request flow is orchestrated inside Postman. Collections contain folders and subfolders with sequences of requests, plus pre-request and test scripts. The runner is intended to execute these sequences in order, preserving variable values and avoiding stored cookies so that state is controlled by the environment and prior responses.

6. The `Custom OData Services/` folder contains XML service definitions that must be uploaded into ByD before the Postman collections can run. These are not stand-alone services in the repo; they are metadata/configuration artifacts consumed by ByD to expose the custom endpoints used by the sample requests.

7. The custom services are shared infrastructure across multiple collections. Examples include business partner, customer, supplier, employee, project, sales, purchasing, logistics, and analytical entities. This means the repo has a reusable service layer feeding multiple scenario packages rather than one service per sample.

8. The main data flow is: configure ByD tenant and communication arrangements, upload the custom OData services, import the matching Postman collection and environment, then execute the request chain from Postman against the tenant. Request responses provide IDs and state transitions that subsequent requests use to continue the business process.

9. The repository also encodes an important operational boundary: collections and environments must be paired correctly. A collection depends on its corresponding environment for tenant host, credentials, and scenario-specific variables; mixing them breaks the request flow.

10. In architecture-diagram terms, the system is best drawn as three layers: local sample assets in GitHub, the Postman execution client, and the SAP Business ByDesign tenant with OData endpoints and custom services. The repository’s purpose is to demonstrate how business process APIs and document flows are stitched together across those boundaries.

Main entry points: [`Postman`](https://github.com/sap-samples/byd-api-samples/tree/main/Postman) (Postman Pack), [`Custom OData Services`](https://github.com/sap-samples/byd-api-samples/tree/HEAD/Custom%20OData%20Services) (Service Pack), [`Postman/Analytics - Data Sources.postman_collection.json`](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Analytics%20-%20Data%20Sources.postman_collection.json) (Analytics), [`Postman/Master Data.postman_collection.json`](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Master%20Data.postman_collection.json) (Master Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_repo["Repository"]
  node_repo_root["ByD API Samples<br/>sample pack"]
end

subgraph group_postman["Postman"]
  node_postman_pack["Postman Pack<br/>client assets"]
  node_analytics_collections["Analytics<br/>collection set"]
  node_master_data_collection["Master Data<br/>collection"]
  node_reference_collection["Reference Scenarios<br/>collection"]
  node_projects_collection["Projects<br/>collection"]
  node_sales_collection["Sales & Commerce<br/>collection"]
  node_logistics_collection["Internal Logistics<br/>collection"]
  node_new_business_collection["New Business<br/>collection"]
  node_supplier_invoicing_collection["Supplier Invoicing<br/>collection"]
  node_analytics_env["Analytics Env<br/>environment"]
  node_master_data_env["Master Data Env<br/>environment"]
  node_reference_env["Reference Env<br/>environment"]
  node_projects_env["Projects Env<br/>environment"]
  node_sales_env["Sales Env<br/>environment"]
  node_logistics_env["Logistics Env<br/>environment"]
  node_new_business_env["New Business Env<br/>environment"]
  node_supplier_invoicing_env["Supplier Env<br/>environment"]
end

subgraph group_services["Custom OData"]
  node_service_pack["Service Pack<br/>odata definitions"]
end

subgraph group_tenant["SAP ByD"]
  node_byd_tenant[("ByD Tenant<br/>external system")]
  node_byd_odata["OData APIs<br/>api surface"]
end

node_repo_root -->|"contains"| node_postman_pack
node_repo_root -->|"contains"| node_service_pack
node_postman_pack -->|"organizes"| node_analytics_collections
node_postman_pack -->|"organizes"| node_master_data_collection
node_postman_pack -->|"organizes"| node_reference_collection
node_postman_pack -->|"organizes"| node_projects_collection
node_postman_pack -->|"organizes"| node_sales_collection
node_postman_pack -->|"organizes"| node_logistics_collection
node_postman_pack -->|"organizes"| node_new_business_collection
node_postman_pack -->|"organizes"| node_supplier_invoicing_collection
node_analytics_collections -->|"pairs with"| node_analytics_env
node_master_data_collection -->|"pairs with"| node_master_data_env
node_reference_collection -->|"pairs with"| node_reference_env
node_projects_collection -->|"pairs with"| node_projects_env
node_sales_collection -->|"pairs with"| node_sales_env
node_logistics_collection -->|"pairs with"| node_logistics_env
node_new_business_collection -->|"pairs with"| node_new_business_env
node_supplier_invoicing_collection -->|"pairs with"| node_supplier_invoicing_env
node_analytics_collections -->|"calls"| node_byd_odata
node_master_data_collection -->|"calls"| node_byd_odata
node_reference_collection -->|"calls"| node_byd_odata
node_projects_collection -->|"calls"| node_byd_odata
node_sales_collection -->|"calls"| node_byd_odata
node_logistics_collection -->|"calls"| node_byd_odata
node_new_business_collection -->|"calls"| node_byd_odata
node_supplier_invoicing_collection -->|"calls"| node_byd_odata
node_service_pack -->|"upload to"| node_byd_tenant
node_byd_tenant -->|"exposes"| node_byd_odata
node_analytics_env -->|"configures"| node_byd_tenant
node_master_data_env -->|"configures"| node_byd_tenant
node_reference_env -->|"configures"| node_byd_tenant
node_projects_env -->|"configures"| node_byd_tenant
node_sales_env -->|"configures"| node_byd_tenant
node_logistics_env -->|"configures"| node_byd_tenant
node_new_business_env -->|"configures"| node_byd_tenant
node_supplier_invoicing_env -->|"configures"| node_byd_tenant
node_analytics_collections -.->|"depends on"| node_service_pack
node_master_data_collection -.->|"depends on"| node_service_pack
node_reference_collection -.->|"depends on"| node_service_pack
node_projects_collection -.->|"depends on"| node_service_pack
node_sales_collection -.->|"depends on"| node_service_pack
node_logistics_collection -.->|"depends on"| node_service_pack
node_new_business_collection -.->|"depends on"| node_service_pack
node_supplier_invoicing_collection -.->|"depends on"| node_service_pack

click node_postman_pack "https://github.com/sap-samples/byd-api-samples/tree/main/Postman"
click node_analytics_collections "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Analytics - Data Sources.postman_collection.json"
click node_master_data_collection "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Master Data.postman_collection.json"
click node_reference_collection "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Reference Scenarios.postman_collection.json"
click node_projects_collection "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Projects.postman_collection.json"
click node_sales_collection "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Sales and Commerce Scenarios.postman_collection.json"
click node_logistics_collection "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Internal Logistics.postman_collection.json"
click node_new_business_collection "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/New Business.postman_collection.json"
click node_supplier_invoicing_collection "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Supplier Invoicing.postman_collection.json"
click node_analytics_env "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Analytics.postman_environment.json"
click node_master_data_env "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Master Data.postman_environment.json"
click node_reference_env "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Reference Scenarios.postman_environment.json"
click node_projects_env "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Projects.postman_environment.json"
click node_sales_env "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Sales and Commerce Scenarios.postman_environment.json"
click node_logistics_env "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Internal Logistics.postman_environment.json"
click node_new_business_env "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/New Business.postman_environment.json"
click node_supplier_invoicing_env "https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Supplier Invoicing - Einvoicing.postman_environment.json"
click node_service_pack "https://github.com/sap-samples/byd-api-samples/tree/main/Custom OData Services"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_repo_root toneBlue
class node_postman_pack,node_analytics_collections,node_master_data_collection,node_reference_collection,node_projects_collection,node_sales_collection,node_logistics_collection,node_new_business_collection,node_supplier_invoicing_collection,node_analytics_env,node_master_data_env,node_reference_env,node_projects_env,node_sales_env,node_logistics_env,node_new_business_env,node_supplier_invoicing_env toneAmber
class node_service_pack toneMint
class node_byd_tenant,node_byd_odata toneRose
```

## Components

### Repository

Local sample assets tracked in GitHub

- **ByD API Samples**: sample pack · Repository for integration learning assets and business-process scenarios

### Postman

Scenario collections and matching environments

- [Postman Pack](https://github.com/sap-samples/byd-api-samples/tree/main/Postman): client assets · Client-side request runner assets for scenario execution · `Postman`
- [Analytics](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Analytics%20-%20Data%20Sources.postman_collection.json): collection set · Analytics request chains covering data sources, KPIs, and reports · `Postman/Analytics - Data Sources.postman_collection.json`
- [Master Data](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Master%20Data.postman_collection.json): collection · Master data creation and maintenance scenarios · `Postman/Master Data.postman_collection.json`
- [Reference Scenarios](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Reference%20Scenarios.postman_collection.json): collection · Reference request flows for baseline ByDesign interactions · `Postman/Reference Scenarios.postman_collection.json`
- [Projects](https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Projects.postman_collection.json): collection · Project-related document flows and object handling · `Postman/Projects.postman_collection.json`
- [Sales & Commerce](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Sales%20and%20Commerce%20Scenarios.postman_collection.json): collection · Sales and commerce document flow scenarios · `Postman/Sales and Commerce Scenarios.postman_collection.json`
- [Internal Logistics](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Internal%20Logistics.postman_collection.json): collection · Internal logistics request chains and follow-on documents · `Postman/Internal Logistics.postman_collection.json`
- [New Business](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/New%20Business.postman_collection.json): collection · Lead-to-opportunity and new business scenario flows · `Postman/New Business.postman_collection.json`
- [Supplier Invoicing](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Supplier%20Invoicing.postman_collection.json): collection · Supplier invoicing and e-invoicing scenarios · `Postman/Supplier Invoicing.postman_collection.json`
- [Analytics Env](https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Analytics.postman_environment.json): environment · Tenant URL, credentials, and variables for analytics scenarios · `Postman/Analytics.postman_environment.json`
- [Master Data Env](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Master%20Data.postman_environment.json): environment · Environment for master data request chains · `Postman/Master Data.postman_environment.json`
- [Reference Env](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Reference%20Scenarios.postman_environment.json): environment · Environment for reference scenarios · `Postman/Reference Scenarios.postman_environment.json`
- [Projects Env](https://github.com/sap-samples/byd-api-samples/blob/main/Postman/Projects.postman_environment.json): environment · Environment for project scenarios · `Postman/Projects.postman_environment.json`
- [Sales Env](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Sales%20and%20Commerce%20Scenarios.postman_environment.json): environment · Environment for sales and commerce scenarios · `Postman/Sales and Commerce Scenarios.postman_environment.json`
- [Logistics Env](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Internal%20Logistics.postman_environment.json): environment · Environment for internal logistics scenarios · `Postman/Internal Logistics.postman_environment.json`
- [New Business Env](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/New%20Business.postman_environment.json): environment · Environment for new business scenarios · `Postman/New Business.postman_environment.json`
- [Supplier Env](https://github.com/sap-samples/byd-api-samples/blob/HEAD/Postman/Supplier%20Invoicing%20-%20Einvoicing.postman_environment.json): environment · Environment for supplier invoicing scenarios · `Postman/Supplier Invoicing - Einvoicing.postman_environment.json`

### Custom OData

XML service definitions consumed by ByDesign

- [Service Pack](https://github.com/sap-samples/byd-api-samples/tree/HEAD/Custom%20OData%20Services): odata definitions · Reusable custom OData service metadata uploaded into ByDesign · `Custom OData Services`

### SAP ByD

External Business ByDesign tenant and exposed OData APIs

- **ByD Tenant**: external system · Target SAP Business ByDesign tenant hosting the business objects
- **OData APIs**: api surface · Tenant-exposed OData endpoints used by the Postman scenarios

## Connections

- ByD API Samples → Postman Pack: contains · Repository ships Postman scenario assets
- ByD API Samples → Service Pack: contains · Repository ships custom OData service definitions
- Postman Pack → Analytics: organizes · Postman layer groups scenario collections by business domain
- Postman Pack → Master Data: organizes · Postman layer groups scenario collections by business domain
- Postman Pack → Reference Scenarios: organizes · Postman layer groups scenario collections by business domain
- Postman Pack → Projects: organizes · Postman layer groups scenario collections by business domain
- Postman Pack → Sales & Commerce: organizes · Postman layer groups scenario collections by business domain
- Postman Pack → Internal Logistics: organizes · Postman layer groups scenario collections by business domain
- Postman Pack → New Business: organizes · Postman layer groups scenario collections by business domain
- Postman Pack → Supplier Invoicing: organizes · Postman layer groups scenario collections by business domain
- Analytics → Analytics Env: pairs with · Scenario execution depends on matching tenant and variables
- Master Data → Master Data Env: pairs with · Scenario execution depends on matching tenant and variables
- Reference Scenarios → Reference Env: pairs with · Scenario execution depends on matching tenant and variables
- Projects → Projects Env: pairs with · Scenario execution depends on matching tenant and variables
- Sales & Commerce → Sales Env: pairs with · Scenario execution depends on matching tenant and variables
- Internal Logistics → Logistics Env: pairs with · Scenario execution depends on matching tenant and variables
- New Business → New Business Env: pairs with · Scenario execution depends on matching tenant and variables
- Supplier Invoicing → Supplier Env: pairs with · Scenario execution depends on matching tenant and variables
- Analytics → OData APIs: calls · Collections execute ordered OData requests against the tenant
- Master Data → OData APIs: calls · Collections execute ordered OData requests against the tenant
- Reference Scenarios → OData APIs: calls · Collections execute ordered OData requests against the tenant
- Projects → OData APIs: calls · Collections execute ordered OData requests against the tenant
- Sales & Commerce → OData APIs: calls · Collections execute ordered OData requests against the tenant
- Internal Logistics → OData APIs: calls · Collections execute ordered OData requests against the tenant
- New Business → OData APIs: calls · Collections execute ordered OData requests against the tenant
- Supplier Invoicing → OData APIs: calls · Collections execute ordered OData requests against the tenant
- Service Pack → ByD Tenant: upload to · Service metadata must be imported into ByDesign before runs
- ByD Tenant → OData APIs: exposes · Tenant provides the OData API surface used by sample requests
- Analytics Env → ByD Tenant: configures · Environment supplies tenant host and credentials
- Master Data Env → ByD Tenant: configures · Environment supplies tenant host and credentials
- Reference Env → ByD Tenant: configures · Environment supplies tenant host and credentials
- Projects Env → ByD Tenant: configures · Environment supplies tenant host and credentials
- Sales Env → ByD Tenant: configures · Environment supplies tenant host and credentials
- Logistics Env → ByD Tenant: configures · Environment supplies tenant host and credentials
- New Business Env → ByD Tenant: configures · Environment supplies tenant host and credentials
- Supplier Env → ByD Tenant: configures · Environment supplies tenant host and credentials
- Analytics → Service Pack: depends on · Analytics scenarios consume shared custom entities
- Master Data → Service Pack: depends on · Business object scenarios consume shared custom entities
- Reference Scenarios → Service Pack: depends on · Reference scenarios consume shared custom entities
- Projects → Service Pack: depends on · Project scenarios consume shared custom entities
- Sales & Commerce → Service Pack: depends on · Sales scenarios consume shared custom entities
- Internal Logistics → Service Pack: depends on · Logistics scenarios consume shared custom entities
- New Business → Service Pack: depends on · New business scenarios consume shared custom entities
- Supplier Invoicing → Service Pack: depends on · Supplier invoicing scenarios consume shared custom entities
