{"openapi":"3.0.3","info":{"title":"MSG API","description":"<p>In it's current incarnation this API is to only be used for synchronisation with back-office systems, and <strong>not client-side apps.</strong> As such there is no cross-origin resource sharing (CORS) headers enabled.</p>","version":"2.0.0","termsOfService":"https://dashboard.marinestoresguide.com/content/2"},"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer"}},"schemas":{"Product":{"title":"Product","type":"object","properties":{"part_no":{"type":"string"},"description_1":{"type":"string"},"description_2":{"type":"string"},"explanation":{"type":"string"},"uom":{"type":"string"},"mtml_uom":{"type":"string"},"picture":{"type":"string","format":"uuid","description":"The UUID of the picture, use the asset endpoint to retrieve."},"date_created":{"type":"string","format":"date-time"},"date_updated":{"type":"string","format":"date-time"},"category_level_1":{"$ref":"#/components/schemas/Category"},"category_level_2":{"$ref":"#/components/schemas/Category"},"category_level_3":{"$ref":"#/components/schemas/Category"},"status":{"type":"string"},"enhanced_data":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"title":{"type":"string"}}}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"}}}},"links":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}}}}}}},"Category":{"title":"Category","type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"code":{"type":"string"},"date_created":{"type":"string","format":"date-time"},"date_updated":{"type":"string","format":"date-time"},"level":{"type":"integer","description":"The level of the category, 1 is the top level."},"parent":{"type":"string","format":"uuid","description":"The UUID of the parent category, null for top-level categories."}}},"Meta":{"title":"Meta","type":"object","properties":{"filter_count":{"type":"number","description":"Total number of items returned for current query."},"total_pages":{"type":"number","description":"Total number of pages."},"current_page":{"type":"number","description":"The current page.","default":1}}},"Error":{"title":"Error","type":"object","properties":{"statusCode":{"type":"string"},"error":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/assets/{id}":{"get":{"summary":"Get an asset","tags":["Assets"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The asset's ID"}],"responses":{"200":{"description":"Successful operation","content":{"image/jpeg":{"schema":{"description":"Successful operation","type":"string","format":"binary"}},"image/png":{"schema":{"description":"Successful operation","type":"string","format":"binary"}},"image/pdf":{"schema":{"description":"Successful operation","type":"string","format":"binary"}},"image/zip":{"schema":{"description":"Successful operation","type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"image/jpeg":{"schema":{"$ref":"#/components/schemas/Error"}},"image/png":{"schema":{"$ref":"#/components/schemas/Error"}},"image/pdf":{"schema":{"$ref":"#/components/schemas/Error"}},"image/zip":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authorization error","content":{"image/jpeg":{"schema":{"$ref":"#/components/schemas/Error"}},"image/png":{"schema":{"$ref":"#/components/schemas/Error"}},"image/pdf":{"schema":{"$ref":"#/components/schemas/Error"}},"image/zip":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Asset not found","content":{"image/jpeg":{"schema":{"$ref":"#/components/schemas/Error"}},"image/png":{"schema":{"$ref":"#/components/schemas/Error"}},"image/pdf":{"schema":{"$ref":"#/components/schemas/Error"}},"image/zip":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/categories/":{"get":{"summary":"Get categories","tags":["Categories"],"parameters":[{"schema":{"type":"integer","default":100,"minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer"},"in":"query","name":"page","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"updatedAfter","required":false}],"responses":{"200":{"description":"Returns all categories","content":{"application/json":{"schema":{"description":"Returns all categories","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/categories/{id}/":{"get":{"summary":"Get category","tags":["Categories"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"A category UUID"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/":{"get":{"summary":"Get all products","tags":["Products"],"description":"<p>All products have a status of either <code>published</code> or <code>archived</code>. Archived items are not shown by default, but can be enabled by setting <code>showArchived</code> to <code>true</code>. Products are sorted by <code>part_no</code>.</p>","parameters":[{"schema":{"type":"integer","default":100,"minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":1},"in":"query","name":"page","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"updatedAfter","required":false,"description":"Will only retrieve products updated after this time, must be in date-time format i.e. <code>YYYY-MM-DDTHH:mm:ssTZD</code>"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"category","required":false,"description":"Show items related to single category"},{"schema":{"type":"boolean"},"in":"query","name":"showArchived","required":false,"description":"When set to true will include any archived products, it is recommended to have this enabled when doing incremental synchronisations."}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"description":"Successful operation","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/{part_no}/":{"get":{"summary":"Get a single product","tags":["Products"],"parameters":[{"schema":{"type":"string","pattern":"^[0-9]{6}$"},"in":"path","name":"part_no","required":true,"description":"The IMPA part number"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authorization error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"servers":[{"url":"https://api.marinestoresguide.com/v2","description":"API Server"}],"security":[{"Bearer":[]}],"tags":[{"name":"Products","description":"Product API"},{"name":"Categories","description":"Category API"}]}