openapi: 3.2.0 info: title: Online Store Addresses API version: '1.0' description: Online Store API servers: - url: https://www.yoursite.com/api/v1 description: '' security: - X-AC-Auth-Token: [] tags: - name: Addresses paths: /addresses: get: summary: Get Addresses tags: - Addresses responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer addresses: type: array items: $ref: '#/components/schemas/addresses' operationId: get-addresses description: Gets an array of addresses post: summary: Create an Address operationId: post-addresses responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/addresses' requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: id: 2 customer_id: 13 address_line_1: 323 forever address_line_2: '' city: lolapalooza state: Texas postal_code: '77701' country: United States is_default_shipping_address: false phone: '1234567897' company: '' alternate_phone: '' fax: '' comments: '' is_default_billing_address: false updated_at: '2019-04-01T17:12:37.187-05:00' created_at: '2019-04-01T17:12:37.107-05:00' first_name: James last_name: Madison address_type: Default properties: customer_id: type: integer address_line_1: type: string address_line_2: type: string city: type: string state: type: string postal_code: type: string country: type: string is_default_shipping_address: type: boolean phone: type: string company: type: string alternate_phone: type: string fax: type: string comments: type: string is_default_billing_address: type: boolean updated_at: type: string created_at: type: string first_name: type: string last_name: type: string address_type: type: string required: - customer_id - country examples: Example: value: customer_id: 13 address_line_1: 251 N Bristol Ave address_line_2: '' city: Los Angeles state: California postal_code: '90049' country: United States is_default_shipping_address: false phone: '1234567897' company: '' alternate_phone: '' fax: '' comments: '' is_default_billing_address: false updated_at: '2019-04-01T17:12:37.187-05:00' created_at: '2019-04-01T17:12:37.107-05:00' first_name: Will last_name: Smith address_type: Default description: Creates an address tags: - Addresses /addresses/{id}: parameters: - schema: type: integer name: id in: path required: true description: The ID of the `address` put: summary: Update an Address operationId: put-addresses-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/addresses' description: Update an address by ID. requestBody: content: application/json: schema: $ref: '#/components/schemas/addresses' examples: Example: value: customer_id: 13 address_line_1: 251 N Bristol Ave address_line_2: '' city: Los Angeles state: California postal_code: '90049' country: United States is_default_shipping_address: false phone: '1234567897' company: '' alternate_phone: '' fax: '' comments: '' is_default_billing_address: false updated_at: '2019-04-01T17:12:37.187-05:00' created_at: '2019-04-01T17:12:37.107-05:00' first_name: Will last_name: Smith address_type: Default tags: - Addresses delete: summary: Delete an Address operationId: delete-addresses-id responses: '200': description: OK '404': $ref: '#/components/responses/404' tags: - Addresses description: Delete an address by ID. components: responses: '404': description: Resource Not Found content: application/json: schema: description: Not Found type: object x-examples: example-1: status_code: 404 message: Not Found details: No resource found properties: status_code: type: number message: type: string details: type: string examples: {} headers: {} schemas: addresses: type: object properties: id: type: integer readOnly: true customer_id: type: integer address_line_1: type: string address_line_2: type: string city: type: string state: type: string postal_code: type: string country: type: string is_default_shipping_address: type: boolean phone: type: string company: type: string alternate_phone: type: string fax: type: string comments: type: string is_default_billing_address: type: boolean updated_at: type: string created_at: type: string first_name: type: string last_name: type: string address_type: type: string securitySchemes: X-AC-Auth-Token: name: X-AC-Auth-Token type: apiKey in: header