Source payload and API response contract.
API integration tests
and interface behavior
Executable test package for B2B order synchronization: from source data through mapping to the target-system response and PASS/FAIL report.
Mapping → HTTP request → response validation.
Status, schema, mapping, duplicate and timeout.
Expected/actual, JSON diff and JSON/CSV report.
Results match the scenario matrix; async supplement: PASS → one regression → PASS.
GET /source/ordersPOST /target/ordersPASS / FAILWebhook delivery acceptance
HMAC-SHA256, idempotency key, duplicate delivery, timeout and retry. An isolated receiver executes scenarios in one API request. Timeout is a controlled transport simulation.
Reference: all tests PASS. Controlled change: deduplication is disabled for one delivery. Expected rejection of invalid input means the test passes.
Execution result
Intentional FAIL results prove discrepancy detection; they do not mean an application error.
The package checks field mapping, contract validation, HTTP statuses, idempotency, data consistency and retry behavior.
Contract validation and compatibility
A small response contract is executed against six synthetic responses. An added optional field is compatible; a missing required field or type change is breaking.
| Scenario | Response version | Result | Compatibility | Field / rule | Expected / actual |
|---|---|---|---|---|---|
CONTRACT-BASELINEBaseline contract | target-order-response/1.2 | PASS | baseline | response CONTRACT_REQUIRED_FIELDS | response compatible with contract compatible |
CONTRACT-MISSINGMissing required field | target-order-response/1.2-bad-missing | FAIL | breaking | targetId CONTRACT_REQUIRED_FIELDS | present missing |
CONTRACT-TYPEWrong field type | target-order-response/1.2-bad-type | FAIL | breaking | targetId CONTRACT_FIELD_TYPE | string number |
CONTRACT-ENUMInvalid enum value | target-order-response/1.2-bad-enum | FAIL | breaking | lifecycle CONTRACT_ENUM_VALUE | NEW|CONFIRMED|SHIPPED ARCHIVED |
CONTRACT-ADDITIVEOptional field added | target-order-response/1.3-compatible | PASS | compatible | response CONTRACT_ADDITIVE_OPTIONAL | response compatible with contract compatible |
CONTRACT-BREAKINGBreaking contract change | target-order-response/2.0-breaking | FAIL | breaking | accepted CONTRACT_FIELD_TYPE | boolean string |
A testable contract instead of an unclear integration
Scenarios and data are synthetic. In a real scope, criteria are based on the agreed specification and examples.
Contract and examples
Field specification, dictionary values and sample source/target payloads.
Explicit scenarios
Success cases, expected rejections, contract errors and transport behavior.
PASS/FAIL report
Identifier, payload, expected and actual result, and readable JSON diff.
Measurable acceptance
Stable dataset, agreed results and a reusable executable regression package.
Isolated API integration acceptance
API specification and examples → agreed scenarios → executable test pack → discrepancy report → PASS/FAIL acceptance.
The scope focuses on an isolated integration, post-change regression or migration validation with clear acceptance criteria.
Discuss a similar scope