Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API endpoints to manage default delivery channels for customer #720

Closed
donaldgray opened this issue Jan 30, 2024 · 2 comments · Fixed by #742
Closed

API endpoints to manage default delivery channels for customer #720

donaldgray opened this issue Jan 30, 2024 · 2 comments · Fixed by #742
Assignees
Labels
API https://dlcs-book.readthedocs.io/en/latest/ C-W delivery-channels jira marks issue for crossposting to JIRA

Comments

@donaldgray
Copy link
Member

donaldgray commented Jan 30, 2024

Allow a customer to manage their own default delivery channels at a customer level.

See docs:

Acceptance Criteria

Support the following verbs:

  • GET /customers/{customer}/defaultDeliveryChannels - get customer delivery channel defaults
    • Returns hydra:Collection (of vocab:DeliveryChannel)
    • Returns 200 if found.
    • Returns only defaultDeliveryChannels with space=0
    • If system policy return the name only
    • If non-system policy return fully qualified uri
  • POST /customers/{customer}/defaultDeliveryChannels - create customer delivery channel defaults
    • Returns 201 Created on success
    • All fields are required, channel, policy and mediaType
    • The platform will create a GUID for the last path element
    • Creates item with space=0
  • GET /customers/{customer}/defaultDeliveryChannels/{id} - get delivery channel default
    • Returns vocab:DeliveryChannel
    • Returns 200 if found.
    • If system policy return the name only
    • If non-system policy return fully qualified uri
  • PUT /customers/{customer}/defaultDeliveryChannels/{id} - update delivery channel default
    • Returns 200 on success.
    • Update only, cannot create via PUT
    • id property is GUID generated on POST
    • Can only update space=0 defaults. Cannot change space value
  • DELETE /customers/{customer}/defaultDeliveryChannels/{id} - delete delivery channel default
    • Returns 204 NoContent
    • id property is GUID generated on POST
    • Can only delete space=0 defaults.
  • There are Playwright tests for all the above

Returned status codes not exhaustive. Standard rules apply for NotFound, BadRequest, InternalServerError etc

@tomcrane
Copy link
Contributor

requires #735

@JackLewis-digirati
Copy link
Contributor

note that this should probably now be Returns hydra:Collection (of vocab:DefaultDeliveryChannel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API https://dlcs-book.readthedocs.io/en/latest/ C-W delivery-channels jira marks issue for crossposting to JIRA
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants