Skip to content

API Integration for Donation Page: API (POST /api/products) #255

@yusuphjoluwasen

Description

@yusuphjoluwasen

MVP Design

Image

Why
As a seller
I want to create a new product via the backend API
So that my product is stored in the system and becomes available for buyers to view.

Acceptance Criteria

  • Given I fill out the product creation form

  • When I tap the "Submit" button

  • Then the app should send a POST request to https://cherry-backend-401854471349.europe-west2.run.app/api/products

  • And I should see a success message when the product is created successfully.

  • Given the API returns a validation error (e.g., missing fields)

  • When I submit the form

  • Then I should see the error messages mapped to their respective fields.

  • Given the API is unreachable or returns a 5xx error

  • When I attempt to create a product

  • Then the app should show an error message (e.g., "Unable to create product, please try again later") and allow retrying.

API-docs: https://cherry-backend-401854471349.europe-west2.run.app/api-docs/

Metadata

Metadata

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