Skip to content

Format of InventoryEntryCreated message doesn't match the spec #277

@buztard

Description

@buztard

According the the spec and docs the inventoryEntry field of the InventoryEntryCreated message should contain an InventoryEntry.

The messages API instead returns the following structure (didn't check the format in subscriptions yet):

{
    "id": "00000000-0000-0000-0000-000000000000",
    "version": 1,
    "versionModifiedAt": "2022-11-17T13:59:00.080Z",
    "sequenceNumber": 1,
    "resource": {
        "typeId": "inventory-entry",
        "id": "11111111-1111-1111-1111-111111111111"
    },
    "resourceVersion": 1,
    "resourceUserProvidedIdentifiers": {
        "sku": "my-sku"
    },
    "type": "InventoryEntryCreated",
    "inventoryEntry": {
        "type": "InventoryEntryCreated",
        "inventoryEntryId": "11111111-1111-1111-1111-111111111111",
        "sku": "my-sku",
        "supplyChannel": {
            "typeId": "channel",
            "id": "22222222-2222-2222-2222-222222222222"
        },
        "quantityOnStock": 123,
        "restockableInDays": 2,
        "messageId": {
            "id": "00000000-0000-0000-0000-000000000000",
            "sequenceNumber": 1
        }
    },
    "createdAt": "2022-11-17T13:59:00.080Z",
    "lastModifiedAt": "2022-11-17T13:59:00.080Z",
    "lastModifiedBy": {
        "isPlatformClient": false,
        "clientId": "client-id"
    },
    "createdBy": {
        "isPlatformClient": false,
        "clientId": "client-id"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions