pn-paper-channel-tenderAPILambda Lambda function provides read-only access to pn-paper-channel data without going through the REST back-office API. You invoke it directly using the AWS SDK or CLI, passing a JSON payload that specifies an operation and its parameters.
Use this Lambda when you need programmatic or internal access to tender data from within the AWS ecosystem (e.g., from other Lambda functions, scripts, or automation pipelines). For back-office user-facing operations and write access, use the back-office REST API instead.
Function name
X in the AWS SSO profile sso_pn-core-X with the appropriate environment identifier (e.g., dev, uat, prod).
Invocation pattern
All operations share the same invocation pattern. Setoperation in the payload to select which operation to run.
The
--payload value must be a JSON string. On some systems you may need to base64-encode it: --payload $(echo '<json>' | base64).Operations
GET_TENDERS — list all tenders
GET_TENDERS — list all tenders
Returns a paginated list of tenders. You can narrow results with an optional date range filter.
Payload
Must be
"GET_TENDERS".Zero-based page number to retrieve (integer).
Number of items per page (integer).
Start of the date range filter. ISO 8601 UTC format, e.g.
2024-01-01T08:00:00.000Z.End of the date range filter. ISO 8601 UTC format, e.g.
2024-12-31T23:59:59.999Z.Response
200 on success, 400 on input validation error.Human-readable description of the result.
Paginated list of tender objects. Empty array when no tenders match the filter.
Status codes
| Code | Description |
|---|---|
200 | Tenders filtered by the provided query parameters |
400 | Input data format error |
AWS CLI example
GET_TENDER_ACTIVE — get the currently active tender
GET_TENDER_ACTIVE — get the currently active tender
Returns the single tender that is currently active. Returns
404 if no active tender exists.Payload
Must be
"GET_TENDER_ACTIVE".Response
200 on success, 400 on input error, 404 if no active tender is found.Human-readable description of the result.
The currently active tender.
Status codes
| Code | Description |
|---|---|
200 | Currently active tender returned |
400 | Input data format error |
404 | No active tender found |
AWS CLI example
GET_COSTS — list costs for a tender
GET_COSTS — list costs for a tender
Returns all costs associated with a tender. You can filter by product, lot, zone, or delivery driver.
Payload
Must be
"GET_COSTS".Unique identifier of the tender whose costs you want to retrieve.
Filter by product type (e.g.,
AR, RS, 890).Filter by lot identifier.
Filter by delivery zone.
Filter by delivery driver identifier.
Response
200 on success, 400 on input error, 404 if the tender is not found.Human-readable description of the result.
List of cost records matching the filter.
Status codes
| Code | Description |
|---|---|
200 | Costs associated with the tender ID |
400 | Input data format error |
404 | Tender not found |
AWS CLI example
GET_COST — get a specific cost by tender, product, and geokey
GET_COST — get a specific cost by tender, product, and geokey
Returns a single cost record identified by tender ID, product type, and geokey.
Payload
Must be
"GET_COST".Unique identifier of the tender.
Product type (e.g.,
AR, RS, 890).Geographic key identifying the delivery area (CAP code or international zone).
Response
200 on success, 400 on input error, 404 if the tender or geokey is not found.Human-readable description of the result.
The matching cost record.
Status codes
| Code | Description |
|---|---|
200 | Cost for the specified tender, product, and geokey |
400 | Input data format error |
404 | Tender or geokey not found |
AWS CLI example
GET_GEOKEY — get versions of a specific geokey
GET_GEOKEY — get versions of a specific geokey
Returns all historical versions of a geokey for a given tender and product combination. This is useful for auditing coverage changes over time.
Payload
Must be
"GET_GEOKEY".Unique identifier of the tender.
Product type (e.g.,
AR, RS, 890).Geographic key to look up (CAP code or international zone identifier).
Response
200 on success, 400 on input error.Human-readable description of the result.
List of geokey version records.
Status codes
| Code | Description |
|---|---|
200 | List of geokey versions |
400 | Input data format error |
AWS CLI example
GET_DELIVERY_DRIVERS — list all delivery drivers
GET_DELIVERY_DRIVERS — list all delivery drivers
Returns a list of all delivery drivers registered in the system.
Payload
Must be
"GET_DELIVERY_DRIVERS".Response
200 on success, 400 on input error.Human-readable description of the result.
List of all delivery driver records.
Status codes
| Code | Description |
|---|---|
200 | List of delivery drivers |
400 | Input data format error |
AWS CLI example
Lambda vs REST API
| Capability | Lambda | Back-office REST API |
|---|---|---|
| Read tenders | Yes | Yes |
| Read costs and geokeys | Yes | Yes (costs only) |
| Read delivery drivers | Yes | Yes |
| Create / update / delete | No | Yes |
| Authentication | AWS IAM / SSO profile | x-api-key header |
| Best for | Internal automation, scripts, other Lambda functions | Back-office UI, external integrations |
The Lambda function is read-only. For any write operations (creating or updating tenders, drivers, or costs), use the back-office REST API.