develop #4

Merged
bboterm merged 11 commits from develop into main 2024-11-05 09:45:01 +00:00
Showing only changes of commit c6d31a01e3 - Show all commits

View File

@ -531,6 +531,158 @@ paths:
},
]
/productmetadata:
get:
summary: Get all product metadata.
description: Get all product metadata.
tags:
- Metadata v2
parameters:
- in: query
name: productMetadataId
schema:
type: string
format: uuid
example: 37a8095b-19db-498f-9349-5f37d21c5bdf
description: The id of the product metadata.
- in: query
name: productCode
schema:
type: string
example: 4031
description: The product code.
- in: query
name: department
schema:
type: string
example: 900
description: The department.
- in: query
name: costCenter
schema:
type: string
example: 84955
description: The cost center.
- in: query
name: costType
schema:
type: string
example: 619031
description: The cost type.
- in: query
name: description
schema:
type: string
example: O4031_Reisproduct HTM 1 dag Anoniem
description: The description.
- in: query
name: documentCode
schema:
type: string
example: VERK_FACTUUR
description: The document code.
- in: query
name: timestampUpdated
schema:
type: string
example: 2022-01-01 00:00:00
description: The timestamp updated.
- in: query
name: validAt
schema:
type: string
example: 2024-03-22T09:00:00
description: Timestamp that the metadata is valid.
- in: query
name: contraAccountMetadataId
schema:
type: string
format: uuid
example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb
description: Find product metadata that is linked to this contra account.
- in: query
name: concessionId
schema:
type: integer
example: 1
description: Find product metadata that is linked to this concession.
- in: query
name: sourceMetadataId
schema:
type: string
format: uuid
example: 08d96f94-f468-467e-9068-c86c34f43097
description: Find product metadata that is linked to this source metadata.
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61",
"productCode": "4031",
"department": "900",
"costCenter": "84955",
"costType": "619031",
"description": "O4031_Reisproduct HTM 1 dag Anoniem",
"documentCode": "VERK_FACTUUR",
"timestampUpdated": "2022-01-01T00:00:00",
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
"productContraAccounts":
[
{
"contraAccountMetadata":
{
"contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb",
"contraAccount": "220.10419",
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
},
"concession": { "concessionId": 2, "name": "bus" },
"sourceMetadata":
{
"sourceMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0",
"incomingName": "VerkoopEngine",
"incomingEntity": "OrderLine",
"outgoingName": "Website Verkopen",
"businessOwner": "Corneel Verstoep",
"rejectionProcessing": "system",
"rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc",
"validFrom": "2024-01-01T00:00:00.000",
"validUntil": null,
},
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
},
{
"contraAccountMetadata":
{
"contraAccountMetadataId": "69c562ca-5299-4585-ac92-46fb54aeb99e",
"contraAccount": "220.10538",
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
},
"concession": { "concessionId": 1, "name": "bus" },
"sourceMetadata":
{
"sourceMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0",
"incomingName": "VerkoopEngine",
"incomingEntity": "OrderLine",
"outgoingName": "Website Verkopen",
"businessOwner": "Corneel Verstoep",
"rejectionProcessing": "system",
"rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc",
"validFrom": "2024-01-01T00:00:00.000",
"validUntil": null,
},
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
},
],
}
post:
summary: Add product metadata.
description: Add product metadata.
@ -553,6 +705,23 @@ paths:
"timestampUpdated": "2022-01-01 00:00:00",
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
"productContraAccounts":
[
{
"contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb",
"concessionId": 1,
"sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097",
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
},
{
"contraAccountMetadataId": "02e458ce-f77a-4262-8b38-490e54f52856",
"concessionId": 2,
"sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097",
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
},
],
}
responses:
"201":
@ -1453,14 +1622,15 @@ paths:
"user": "rmeeuws",
"timestamp": "2022-01-01 00:00:00",
"correlationId": "a3891560-3084-42cb-867c-f289e7cda47d",
"metadataChanges": [
"metadataChanges":
[
{
"metadataChangesId": "43a481a7-0845-460f-b44a-b4112cc2e193",
"fieldName": "businessOwner",
"oldValue": "Corneel Verstoep",
"newValue": "Jan-Willem Vermeij",
}
]
},
],
}
/concessions:
get:
@ -1477,18 +1647,9 @@ paths:
$ref: "#/components/schemas/unavailable"
example:
[
{
"concessionId": 1,
"name": "rail",
},
{
"concessionId": 2,
"name": "bus",
},
{
"concessionId": 3,
"name": "not_applicable",
},
{ "concessionId": 1, "name": "rail" },
{ "concessionId": 2, "name": "bus" },
{ "concessionId": 3, "name": "not_applicable" },
]
/failurereasons:
get:
@ -1508,12 +1669,12 @@ paths:
{
"failureReasonId": 1,
"reasonCode": "002",
"reasonDesc": "Contra account does not exist"
"reasonDesc": "Contra account does not exist",
},
{
"failureReasonId": 2,
"reasonCode": "003",
"reasonDesc": "Accouting period closed"
"reasonDesc": "Accouting period closed",
},
]
components: