openapi: 3.0.3 info: title: 'Webparts 2 API Documentation' description: '' version: 1.0.0 servers: - url: 'https://moonlit-canopy-fpoomctf1t0a.vapor-farm-b1.com' tags: - name: Endpoints description: '' components: securitySchemes: default: type: http scheme: bearer description: 'You can retrieve your token by visiting your dashboard and clicking Generate API token.' security: - default: [] paths: /api/users: post: summary: 'Store a newly created resource in storage.' operationId: storeANewlyCreatedResourceInStorage description: '' parameters: [] responses: { } tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'Must not be greater than 255 characters.' example: gvaxmysxnectoez nullable: false email: type: string description: 'Must be a valid email address. Must not be greater than 255 characters.' example: micheal94@example.net nullable: false password: type: string description: 'Must be at least 8 characters.' example: lR52id of an existing record in the companies table.' example: 16 nullable: true status: type: string description: '' example: active nullable: false enum: - pending - active language_code: type: string description: 'Must be 2 characters.' example: lc nullable: false get_part_requests: type: boolean description: '' example: false nullable: false required: - name - email - password '/api/users/{user_id}': put: summary: 'Update the specified resource in storage.' operationId: updateTheSpecifiedResourceInStorage description: '' parameters: [] responses: { } tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'Must not be greater than 255 characters.' example: epbcauifu nullable: false email: type: string description: 'Must be a valid email address. Must not be greater than 255 characters.' example: melisa83@example.com nullable: false password: type: string description: 'Must be at least 8 characters.' example: '<=[{"%Jfid of an existing record in the companies table.' example: 17 nullable: true status: type: string description: '' example: active nullable: false enum: - pending - active language_code: type: string description: 'Must be 2 characters.' example: qb nullable: false get_part_requests: type: boolean description: '' example: false nullable: false parameters: - in: path name: user_id description: 'The ID of the user.' example: 41 required: true schema: type: integer /api/user: get: summary: '' operationId: getApiUser description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints /api/login: post: summary: '' operationId: postApiLogin description: '' parameters: [] responses: { } tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: email: type: string description: '' example: smertz@example.com nullable: false password: type: string description: '' example: 'p>!Q}rq1LbU-SL5\J' nullable: false required: - email - password /api/logout: post: summary: 'Destroy an authenticated session.' operationId: destroyAnAuthenticatedSession description: '' parameters: [] responses: { } tags: - Endpoints /api/brands: get: summary: 'GET api/brands Paginated list of brands.' operationId: gETApibrandsPaginatedListOfBrands description: '' parameters: - in: query name: all description: 'Get all brands.' example: '1*' required: false schema: type: string description: 'Get all brands.' example: '1*' nullable: false - in: query name: page description: 'The page number. Defaults to 1.' example: 2 required: false schema: type: integer description: 'The page number. Defaults to 1.' example: 2 nullable: false - in: query name: per_page description: 'The number of items per page. Defaults to 10.' example: 20 required: false schema: type: integer description: 'The number of items per page. Defaults to 10.' example: 20 nullable: false - in: query name: first_letter description: 'The first letter of the brand.' example: A required: false schema: type: string description: 'The first letter of the brand.' example: A nullable: false responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints '/api/brands/slug/{brandSlug}': get: summary: 'Display the specified brand from slug.' operationId: displayTheSpecifiedBrandFromSlug description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints parameters: - in: path name: brandSlug description: 'The slug of the brand.' example: aksel-ketner required: true schema: type: string '/api/brands/{code}': get: summary: 'GET api/brands/{code} Display the specified brand by code.' operationId: gETApibrandscodeDisplayTheSpecifiedBrandByCode description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints parameters: - in: path name: code description: 'The brand code.' example: AK required: true schema: type: string '/api/carts/{sessionId}': get: summary: 'GET all cart items for the user or session.' operationId: gETAllCartItemsForTheUserOrSession description: '' parameters: - in: query name: currency_code description: 'The currency code to use for the cart items.' example: DKK required: false schema: type: string description: 'The currency code to use for the cart items.' example: DKK nullable: false responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints parameters: - in: path name: sessionId description: 'Optional parameter.' required: true schema: type: string examples: omitted: summary: 'When the value is omitted' value: '' present: summary: 'When the value is present' value: labore /api/carts: post: summary: 'POST a new cart item.' operationId: pOSTANewCartItem description: 'It will be registered for the user if logged in, otherwise it will be registered for the session.' parameters: [] responses: { } tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: part_id: type: integer description: 'The id of an existing record in the parts table.' example: 3 nullable: false quantity: type: number description: '' example: 408874.0 nullable: false required: - part_id - quantity '/api/carts/{cart_id}': put: summary: 'PUT cart item.' operationId: pUTCartItem description: 'It will be updated for the user if logged in, otherwise it will be updated for the session.' parameters: [] responses: { } tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: part_id: type: integer description: 'The id of an existing record in the parts table.' example: 20 nullable: false quantity: type: number description: '' example: 6538383.771058 nullable: false session_id: type: string description: 'Must be a valid UUID.' example: 72405e36-d288-37f3-ba98-6243c3524543 nullable: false required: - part_id - quantity delete: summary: 'DELETE cart item if the item belongs to the user.' operationId: dELETECartItemIfTheItemBelongsToTheUser description: '' parameters: [] responses: { } tags: - Endpoints parameters: - in: path name: cart_id description: 'The ID of the cart.' example: 1 required: true schema: type: integer /api/countries: get: summary: 'Paginated list of countries.' operationId: paginatedListOfCountries description: '' parameters: - in: query name: page description: 'The page number.' example: 1 required: false schema: type: integer description: 'The page number.' example: 1 nullable: false responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints '/api/countries/{country_code}': get: summary: 'Display the specified country.' operationId: displayTheSpecifiedCountry description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints parameters: - in: path name: country_code description: '' example: ae required: true schema: type: string /api/companies: get: summary: 'Display a listing of the resource.' operationId: displayAListingOfTheResource description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints '/api/companies/{company_id}': get: summary: 'Display the specified resource.' operationId: displayTheSpecifiedResource description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints parameters: - in: path name: company_id description: 'The ID of the company.' example: 1 required: true schema: type: integer /api/currencies: get: summary: 'Display a listing of the resource.' operationId: displayAListingOfTheResource description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints '/api/inquiries/{company_id}': get: summary: "GET all inquiries and related inquiry_parts for all users of the current users company\nFilter by status and user" operationId: gETAllInquiriesAndRelatedInquiryPartsForAllUsersOfTheCurrentUsersCompanyFilterByStatusAndUser description: '' parameters: - in: query name: retailer_id description: 'Filter by company.' example: '40' required: false schema: type: string description: 'Filter by company.' example: '40' nullable: false - in: query name: status description: 'Filter by status.' example: pending required: false schema: type: string description: 'Filter by status.' example: pending nullable: false - in: query name: user_id description: 'Filter by user.' example: '9843' required: false schema: type: string description: 'Filter by user.' example: '9843' nullable: false - in: query name: sort_field description: 'The field to sort by. Valid values are: part_number, price and inventory.' example: price required: false schema: type: string description: 'The field to sort by. Valid values are: part_number, price and inventory.' example: price nullable: false - in: query name: sort_direction description: 'The direction to sort by.' example: asc required: false schema: type: string description: 'The direction to sort by.' example: asc nullable: false - in: query name: page description: 'The page number.' example: 1 required: false schema: type: integer description: 'The page number.' example: 1 nullable: false - in: query name: per_page description: 'The number of items per page.' example: 10 required: false schema: type: integer description: 'The number of items per page.' example: 10 nullable: false responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: user_id: type: integer description: '' example: 2 nullable: false status: type: string description: '' example: rejected nullable: false enum: - pending - order - rejected sort_field: type: string description: '' example: status nullable: false enum: - part_number - price - quantity - status sort_direction: type: string description: '' example: desc nullable: false enum: - asc - desc page: type: integer description: '' example: 14 nullable: false per_page: type: integer description: '' example: 20 nullable: false parameters: - in: path name: company_id description: 'The ID of the company.' example: 1 required: true schema: type: integer /api/inquiries: post: summary: 'POST Inquiry' operationId: pOSTInquiry description: '' parameters: - in: query name: retailer_id description: 'The company id of the retailer.' example: '40' required: false schema: type: string description: 'The company id of the retailer.' example: '40' nullable: false - in: query name: from_company_id description: 'The company id of the company that the inquiry is sent from. The user has to be related to that company' example: '928' required: false schema: type: string description: 'The company id of the company that the inquiry is sent from. The user has to be related to that company' example: '928' nullable: false - in: query name: from_email description: 'The email of the sender.' example: johndoe@example.com required: false schema: type: string description: 'The email of the sender.' example: johndoe@example.com nullable: false - in: query name: from_name description: 'The name of the sender.' example: 'John Doe' required: false schema: type: string description: 'The name of the sender.' example: 'John Doe' nullable: false - in: query name: to_email description: 'The email of the recipient.' example: janedoe@example.com required: false schema: type: string description: 'The email of the recipient.' example: janedoe@example.com nullable: false - in: query name: to_name description: 'The name of the recipient.' example: 'Jane Doe' required: false schema: type: string description: 'The name of the recipient.' example: 'Jane Doe' nullable: false - in: query name: subject description: 'The subject of the inquiry.' example: 'Inquiry about parts' required: false schema: type: string description: 'The subject of the inquiry.' example: 'Inquiry about parts' nullable: false - in: query name: currency_code description: 'The currency code.' example: DKK required: false schema: type: string description: 'The currency code.' example: DKK nullable: false - in: query name: generated_message description: 'The generated message.' example: 'Part number: 12345, Quantity: 10' required: false schema: type: string description: 'The generated message.' example: 'Part number: 12345, Quantity: 10' nullable: false - in: query name: user_message description: 'The user message.' example: 'Hi. How much is shipping to Denmark for these parts?' required: false schema: type: string description: 'The user message.' example: 'Hi. How much is shipping to Denmark for these parts?' nullable: false - in: query name: send_copy_to_email description: 'Send a copy of the inquiry to the sender.' example: true required: false schema: type: boolean description: 'Send a copy of the inquiry to the sender.' example: true nullable: false responses: { } tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: retailer_id: type: integer description: 'Retailer identifier the inquiry is addressed to.' example: 42 nullable: false from_company_id: type: integer description: 'Company ID of the sender. Must be a company the authenticated user belongs to.' example: 7 nullable: false from_email: type: string description: "Sender's email address. Must be a valid email address." example: alice@example.com nullable: false from_name: type: string description: "Sender's display name." example: 'Alice Sender' nullable: false to_email: type: string description: "Receiver's email address. Must be a valid email address." example: bob@retailer.com nullable: false to_name: type: string description: "Receiver's display name." example: 'Bob Retailer' nullable: false subject: type: string description: 'Subject of the email/inquiry.' example: 'Request for quote' nullable: false currency_code: type: string description: 'ISO 4217 currency code used for prices in this inquiry.' example: USD nullable: false generated_message: type: string description: 'System-generated message body (eg. template output).' example: 'Hello, I would like to request a quote for the following parts…' nullable: false user_message: type: string description: 'Additional message content provided by the user.' example: 'Please prioritize delivery by next week if possible.' nullable: false send_copy_to_email: type: boolean description: 'Whether to send a copy of the inquiry to the sender email.' example: false nullable: false parts: type: array description: 'Line items included in the inquiry.' example: - part_id: 1001 quantity: 2 price: 49.95 - part_id: 1002 quantity: 5 price: 19.5 items: type: object properties: part_id: type: integer description: 'ID of the requested part.' example: 1234 nullable: false quantity: type: integer description: 'Requested quantity for the part.' example: 3 nullable: false price: type: number description: 'Unit price for the part in the specified currency.' example: 12.99 nullable: false required: - part_id - quantity - price required: - retailer_id - from_company_id - from_email - from_name - to_email - to_name - subject - currency_code - generated_message - user_message - parts /api/parts: get: summary: 'Paginated list of parts.' operationId: paginatedListOfParts description: '' parameters: - in: query name: retailer_id description: 'The ID of the retailer/company.' example: 7 required: false schema: type: integer description: 'The ID of the retailer/company.' example: 7 nullable: false - in: query name: brand_code description: 'The code of the brand.' example: cl required: false schema: type: string description: 'The code of the brand.' example: cl nullable: false - in: query name: brand_slug description: 'The slug of the brand.' example: claas required: false schema: type: string description: 'The slug of the brand.' example: claas nullable: false - in: query name: country_code description: 'The country code.' example: dk required: false schema: type: string description: 'The country code.' example: dk nullable: false - in: query name: sort_field description: 'The field to sort by. Valid values are: manufacturer_part_number, name and inventory.' example: manufacturer_part_number required: false schema: type: string description: 'The field to sort by. Valid values are: manufacturer_part_number, name and inventory.' example: manufacturer_part_number nullable: false - in: query name: sort_direction description: 'The direction to sort by.' example: asc required: false schema: type: string description: 'The direction to sort by.' example: asc nullable: false - in: query name: no_of_items description: 'The number of items per page.' example: 10 required: false schema: type: integer description: 'The number of items per page.' example: 10 nullable: false - in: query name: page description: 'The page number.' example: 1 required: false schema: type: integer description: 'The page number.' example: 1 nullable: false responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints '/api/parts/{partNumber}': get: summary: 'Display the specified parts.' operationId: displayTheSpecifiedParts description: "Include parts that match the manufacturer_part_number\nInclude parts that do not have a manufacturer_part_number but match the part_number" parameters: - in: query name: sort_field description: 'The field to sort by. Valid values are: part_number, price and inventory.' example: price required: false schema: type: string description: 'The field to sort by. Valid values are: part_number, price and inventory.' example: price nullable: false - in: query name: sort_direction description: 'The direction to sort by.' example: asc required: false schema: type: string description: 'The direction to sort by.' example: asc nullable: false responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints requestBody: required: false content: application/json: schema: type: object properties: sort_field: type: string description: '' example: brand nullable: true enum: - manufacturer_part_number - part_number - price - name - brand - inventory sort_direction: type: string description: '' example: asc nullable: true enum: - asc - desc parameters: - in: path name: partNumber description: '' example: ut required: true schema: type: string - in: path name: part description: 'The ID of the part.' example: '1' required: true schema: type: string '/api/parts/search/{searchQuery}': get: summary: 'Display a listing of parts matching the search query and filters.' operationId: displayAListingOfPartsMatchingTheSearchQueryAndFilters description: '' parameters: - in: query name: brand_slug description: 'The brand slug to filter parts by.' example: john-deere required: false schema: type: string description: 'The brand slug to filter parts by.' example: john-deere nullable: false - in: query name: country_code description: 'The country code to filter parts by.' example: DK required: false schema: type: string description: 'The country code to filter parts by.' example: DK nullable: false - in: query name: sort_field description: 'The field to sort by.' example: part_number required: false schema: type: string description: 'The field to sort by.' example: part_number nullable: false - in: query name: sort_direction description: 'The direction to sort by.' example: asc required: false schema: type: string description: 'The direction to sort by.' example: asc nullable: false - in: query name: page description: 'The page number to display.' example: 1 required: false schema: type: integer description: 'The page number to display.' example: 1 nullable: false - in: query name: per_page description: 'The number of items to display per page.' example: 10 required: false schema: type: integer description: 'The number of items to display per page.' example: 10 nullable: false - in: query name: currency_code description: 'The currency code to filter parts by.' example: EUR required: false schema: type: string description: 'The currency code to filter parts by.' example: EUR nullable: false responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: searchQuery: type: string description: 'Must be at least 1 character. Must not be greater than 100 characters.' example: mrsholkpuaejriff nullable: true brandSlug: type: string description: 'The title_slug of an existing record in the brands table. Must not be greater than 255 characters.' example: gg nullable: true page: type: integer description: 'Must be at least 1.' example: 42 nullable: true sort_field: type: string description: '' example: name nullable: true enum: - manufacturer_part_number - name - brand - inventory sort_direction: type: string description: '' example: desc nullable: true enum: - asc - desc country_code: type: string description: 'The code of an existing record in the countries table. Must be 2 characters.' example: rj nullable: true currency_code: type: string description: 'The code of an existing record in the currencies table. Must be 3 characters.' example: jpi nullable: false required: - currency_code parameters: - in: path name: searchQuery description: '' example: ex required: true schema: type: string '/api/parts/brand/search/{brandSlug}/{searchQuery}': get: summary: 'Display a listing of parts with the specified brand_slug filtered by optional search query.' operationId: displayAListingOfPartsWithTheSpecifiedBrandSlugFilteredByOptionalSearchQuery description: '' parameters: - in: query name: country_code description: 'The country code to filter parts by.' example: DK required: false schema: type: string description: 'The country code to filter parts by.' example: DK nullable: false - in: query name: sort_field description: 'The field to sort by.' example: part_number required: false schema: type: string description: 'The field to sort by.' example: part_number nullable: false - in: query name: sort_direction description: 'The direction to sort by.' example: asc required: false schema: type: string description: 'The direction to sort by.' example: asc nullable: false - in: query name: page description: 'The page number to display.' example: 1 required: false schema: type: integer description: 'The page number to display.' example: 1 nullable: false - in: query name: per_page description: 'The number of items to display per page.' example: 10 required: false schema: type: integer description: 'The number of items to display per page.' example: 10 nullable: false - in: query name: currency_code description: 'The currency code to filter parts by.' example: EUR required: false schema: type: string description: 'The currency code to filter parts by.' example: EUR nullable: false responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: searchQuery: type: string description: 'Must be at least 1 character. Must not be greater than 100 characters.' example: fpz nullable: true brandSlug: type: string description: 'The title_slug of an existing record in the brands table. Must not be greater than 255 characters.' example: pnnhebahm nullable: true page: type: integer description: 'Must be at least 1.' example: 25 nullable: true sort_field: type: string description: '' example: manufacturer_part_number nullable: true enum: - manufacturer_part_number - name - brand - inventory sort_direction: type: string description: '' example: asc nullable: true enum: - asc - desc country_code: type: string description: 'The code of an existing record in the countries table. Must be 2 characters.' example: ws nullable: true currency_code: type: string description: 'The code of an existing record in the currencies table. Must be 3 characters.' example: myu nullable: false required: - currency_code parameters: - in: path name: brandSlug description: '' example: aliquam required: true schema: type: string - in: path name: searchQuery description: '' example: esse required: true schema: type: string '/api/parts/brand/search/{brandSlug}': get: summary: 'Display a listing of parts with the specified brand_slug filtered by optional search query.' operationId: displayAListingOfPartsWithTheSpecifiedBrandSlugFilteredByOptionalSearchQuery description: '' parameters: - in: query name: country_code description: 'The country code to filter parts by.' example: DK required: false schema: type: string description: 'The country code to filter parts by.' example: DK nullable: false - in: query name: sort_field description: 'The field to sort by.' example: part_number required: false schema: type: string description: 'The field to sort by.' example: part_number nullable: false - in: query name: sort_direction description: 'The direction to sort by.' example: asc required: false schema: type: string description: 'The direction to sort by.' example: asc nullable: false - in: query name: page description: 'The page number to display.' example: 1 required: false schema: type: integer description: 'The page number to display.' example: 1 nullable: false - in: query name: per_page description: 'The number of items to display per page.' example: 10 required: false schema: type: integer description: 'The number of items to display per page.' example: 10 nullable: false - in: query name: currency_code description: 'The currency code to filter parts by.' example: EUR required: false schema: type: string description: 'The currency code to filter parts by.' example: EUR nullable: false responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: searchQuery: type: string description: 'Must be at least 1 character. Must not be greater than 100 characters.' example: zvmoufngpljexjsvdnpmgnl nullable: true brandSlug: type: string description: 'The title_slug of an existing record in the brands table. Must not be greater than 255 characters.' example: ecelpljafwfgvcrkb nullable: true page: type: integer description: 'Must be at least 1.' example: 25 nullable: true sort_field: type: string description: '' example: inventory nullable: true enum: - manufacturer_part_number - name - brand - inventory sort_direction: type: string description: '' example: desc nullable: true enum: - asc - desc country_code: type: string description: 'The code of an existing record in the countries table. Must be 2 characters.' example: wn nullable: true currency_code: type: string description: 'The code of an existing record in the currencies table. Must be 3 characters.' example: eeb nullable: false required: - currency_code parameters: - in: path name: brandSlug description: '' example: voluptatem required: true schema: type: string /api/retailer: get: summary: 'GET retailers (Company model) by geolocation.' operationId: gETRetailersCompanyModelByGeolocation description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints /api/events/callback: post: summary: '' operationId: postApiEventsCallback description: '' parameters: [] responses: { } tags: - Endpoints '/api/events/{topic}': post: summary: '' operationId: postApiEventsTopic description: '' parameters: [] responses: { } tags: - Endpoints parameters: - in: path name: topic description: '' example: quis required: true schema: type: string /api/events/test: get: summary: '' operationId: getApiEventsTest description: '' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: 'This is a test' tags: - Endpoints