Updated POST request bodys
This commit is contained in:
@@ -3,12 +3,13 @@ openapi: 3.0.1
|
|||||||
info:
|
info:
|
||||||
title: DFC Sample API
|
title: DFC Sample API
|
||||||
version: v1.12.1
|
version: v1.12.1
|
||||||
description: |
|
contact: [ hello@datafoodconsortium.org ]
|
||||||
<p>
|
description: |
|
||||||
This API implements the Data Food Consortium (DFC) specifications.
|
<p>
|
||||||
It serves and reads semantic data encoded in JSON-LD.
|
This API implements the Data Food Consortium (DFC) specifications.
|
||||||
<p>
|
It serves and reads semantic data encoded in JSON-LD.
|
||||||
Unfortunately, this description does not appear in the Swagger UI. :-(
|
<p>
|
||||||
|
Unfortunately, this description does not appear in the Swagger UI. :-(
|
||||||
components:
|
components:
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
oidc_token:
|
oidc_token:
|
||||||
@@ -24,7 +25,7 @@ components:
|
|||||||
security:
|
security:
|
||||||
- oidc_token: []
|
- oidc_token: []
|
||||||
paths:
|
paths:
|
||||||
"/api/dfc/addresses/{id}":
|
"/api/dfc/Addresses/{id}":
|
||||||
get:
|
get:
|
||||||
summary: Show address
|
summary: Show address
|
||||||
parameters:
|
parameters:
|
||||||
@@ -44,7 +45,7 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/addresses/40000
|
"@id": http://test.host/api/dfc/Addresses/40000
|
||||||
"@type": dfc-b:Address
|
"@type": dfc-b:Address
|
||||||
dfc-b:hasStreet: 10 Lovely Street
|
dfc-b:hasStreet: 10 Lovely Street
|
||||||
dfc-b:hasPostalCode: '20170'
|
dfc-b:hasPostalCode: '20170'
|
||||||
@@ -53,10 +54,10 @@ paths:
|
|||||||
dfc-b:region: Virginia
|
dfc-b:region: Virginia
|
||||||
dfc-b:latitude: 38.89750
|
dfc-b:latitude: 38.89750
|
||||||
dfc-b:longitude: -77.00920
|
dfc-b:longitude: -77.00920
|
||||||
dfc-b:addressOf: http://test.host/api/dfc/enterprises/10000
|
dfc-b:addressOf: http://test.host/api/dfc/Enterprises/10000
|
||||||
'404':
|
'404':
|
||||||
description: not found
|
description: not found
|
||||||
"/api/dfc/enterprises/{enterprise_id}/catalog_items":
|
"/api/dfc/Enterprises/{enterprise_id}/CatalogItems":
|
||||||
parameters:
|
parameters:
|
||||||
- name: enterprise_id
|
- name: enterprise_id
|
||||||
in: path
|
in: path
|
||||||
@@ -79,24 +80,24 @@ paths:
|
|||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@graph":
|
"@graph":
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000
|
- "@id": http://test.host/api/dfc/Enterprises/10000
|
||||||
"@type": dfc-b:Enterprise
|
"@type": dfc-b:Enterprise
|
||||||
dfc-b:name: Fred's Farm
|
dfc-b:name: Fred's Farm
|
||||||
dfc-b:hasDescription: Beautiful
|
dfc-b:hasDescription: Beautiful
|
||||||
dfc-b:manages: http://test.host/api/dfc/enterprises/10000/catalog_items/10001
|
dfc-b:manages: http://test.host/api/dfc/Enterprises/10000/CatalogItems/10001
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000/catalog_items/10001
|
- "@id": http://test.host/api/dfc/Enterprises/10000/CatalogItems/10001
|
||||||
"@type": dfc-b:CatalogItem
|
"@type": dfc-b:CatalogItem
|
||||||
dfc-b:references: http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
dfc-b:references: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
dfc-b:sku: AR
|
dfc-b:sku: AR
|
||||||
dfc-b:stockLimitation: 0
|
dfc-b:stockLimitation: 0
|
||||||
dfc-b:offeredThrough: http://test.host/api/dfc/enterprises/10000/offers/10001
|
dfc-b:offeredThrough: http://test.host/api/dfc/Enterprises/10000/Offers/10001
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000/offers/10001
|
- "@id": http://test.host/api/dfc/Enterprises/10000/Offers/10001
|
||||||
"@type": dfc-b:Offer
|
"@type": dfc-b:Offer
|
||||||
dfc-b:hasPrice: 19.99
|
dfc-b:hasPrice: 19.99
|
||||||
dfc-b:stockLimitation: 0
|
dfc-b:stockLimitation: 0
|
||||||
'401':
|
'401':
|
||||||
description: unauthorized
|
description: unauthorized
|
||||||
"/api/dfc/enterprises/{enterprise_id}/catalog_items/{id}":
|
"/api/dfc/Enterprises/{enterprise_id}/CatalogItems/{id}":
|
||||||
parameters:
|
parameters:
|
||||||
- name: enterprise_id
|
- name: enterprise_id
|
||||||
in: path
|
in: path
|
||||||
@@ -122,13 +123,13 @@ paths:
|
|||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@graph":
|
"@graph":
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000/catalog_items/10001
|
- "@id": http://test.host/api/dfc/Enterprises/10000/CatalogItems/10001
|
||||||
"@type": dfc-b:CatalogItem
|
"@type": dfc-b:CatalogItem
|
||||||
dfc-b:references: http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
dfc-b:references: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
dfc-b:sku: AR
|
dfc-b:sku: AR
|
||||||
dfc-b:stockLimitation: 0
|
dfc-b:stockLimitation: 0
|
||||||
dfc-b:offeredThrough: http://test.host/api/dfc/enterprises/10000/offers/10001
|
dfc-b:offeredThrough: http://test.host/api/dfc/Enterprises/10000/Offers/10001
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000/offers/10001
|
- "@id": http://test.host/api/dfc/Enterprises/10000/Offers/10001
|
||||||
"@type": dfc-b:Offer
|
"@type": dfc-b:Offer
|
||||||
dfc-b:hasPrice: 19.99
|
dfc-b:hasPrice: 19.99
|
||||||
dfc-b:stockLimitation: 0
|
dfc-b:stockLimitation: 0
|
||||||
@@ -229,7 +230,7 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
example:
|
example:
|
||||||
"@id": http://test.host/api/dfc/enterprises/10001
|
"@id": http://test.host/api/dfc/Enterprises/10001
|
||||||
"/api/dfc/enterprise_groups/{enterprise_group_id}/affiliated_by/{id}":
|
"/api/dfc/enterprise_groups/{enterprise_group_id}/affiliated_by/{id}":
|
||||||
delete:
|
delete:
|
||||||
summary: Remove enterprise from group
|
summary: Remove enterprise from group
|
||||||
@@ -266,7 +267,7 @@ paths:
|
|||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@graph":
|
"@graph":
|
||||||
- "@id": http://test.host/api/dfc/persons/12345
|
- "@id": http://test.host/api/dfc/Persons/12345
|
||||||
"@type": dfc-b:Person
|
"@type": dfc-b:Person
|
||||||
dfc-b:affiliates: http://test.host/api/dfc/enterprise_groups/60000
|
dfc-b:affiliates: http://test.host/api/dfc/enterprise_groups/60000
|
||||||
- "@id": http://test.host/api/dfc/enterprise_groups/60000
|
- "@id": http://test.host/api/dfc/enterprise_groups/60000
|
||||||
@@ -274,7 +275,7 @@ paths:
|
|||||||
dfc-b:name: Sustainable Farmers
|
dfc-b:name: Sustainable Farmers
|
||||||
dfc-b:hasDescription: this is a group
|
dfc-b:hasDescription: this is a group
|
||||||
dfc-b:VATnumber: ''
|
dfc-b:VATnumber: ''
|
||||||
dfc-b:affiliatedBy: http://test.host/api/dfc/enterprises/10000
|
dfc-b:affiliatedBy: http://test.host/api/dfc/Enterprises/10000
|
||||||
"/api/dfc/enterprise_groups/{id}":
|
"/api/dfc/enterprise_groups/{id}":
|
||||||
get:
|
get:
|
||||||
summary: Show groups
|
summary: Show groups
|
||||||
@@ -298,12 +299,12 @@ paths:
|
|||||||
"@graph":
|
"@graph":
|
||||||
- "@id": http://test.host/api/dfc/enterprise_groups/60000
|
- "@id": http://test.host/api/dfc/enterprise_groups/60000
|
||||||
"@type": dfc-b:Enterprise
|
"@type": dfc-b:Enterprise
|
||||||
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000
|
dfc-b:hasAddress: http://test.host/api/dfc/Addresses/40000
|
||||||
dfc-b:name: Sustainable Farmers
|
dfc-b:name: Sustainable Farmers
|
||||||
dfc-b:hasDescription: this is a group
|
dfc-b:hasDescription: this is a group
|
||||||
dfc-b:VATnumber: ''
|
dfc-b:VATnumber: ''
|
||||||
dfc-b:affiliatedBy: http://test.host/api/dfc/enterprises/10000
|
dfc-b:affiliatedBy: http://test.host/api/dfc/Enterprises/10000
|
||||||
- "@id": http://test.host/api/dfc/addresses/40000
|
- "@id": http://test.host/api/dfc/Addresses/40000
|
||||||
"@type": dfc-b:Address
|
"@type": dfc-b:Address
|
||||||
dfc-b:hasStreet: 8 Acres Drive
|
dfc-b:hasStreet: 8 Acres Drive
|
||||||
dfc-b:hasPostalCode: '20170'
|
dfc-b:hasPostalCode: '20170'
|
||||||
@@ -312,7 +313,7 @@ paths:
|
|||||||
dfc-b:region: Virginia
|
dfc-b:region: Virginia
|
||||||
dfc-b:latitude: 38.89750
|
dfc-b:latitude: 38.89750
|
||||||
dfc-b:longitude: -77.00920
|
dfc-b:longitude: -77.00920
|
||||||
"/api/dfc/enterprises/{id}":
|
"/api/dfc/Enterprises/{id}":
|
||||||
get:
|
get:
|
||||||
summary: Show enterprise
|
summary: Show enterprise
|
||||||
parameters:
|
parameters:
|
||||||
@@ -333,29 +334,29 @@ paths:
|
|||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@graph":
|
"@graph":
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000
|
- "@id": http://test.host/api/dfc/Enterprises/10000
|
||||||
"@type": dfc-b:Enterprise
|
"@type": dfc-b:Enterprise
|
||||||
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000
|
dfc-b:hasAddress: http://test.host/api/dfc/Addresses/40000
|
||||||
dfc-b:hasPhoneNumber: 0404 444 000 200
|
dfc-b:hasPhoneNumber: 0404 444 000 200
|
||||||
dfc-b:email: hello@example.org
|
dfc-b:email: hello@example.org
|
||||||
dfc-b:websitePage: openfoodnetwork.org
|
dfc-b:websitePage: openfoodnetwork.org
|
||||||
dfc-b:hasSocialMedia: http://test.host/api/dfc/enterprises/10000/social_medias/facebook
|
dfc-b:hasSocialMedia: http://test.host/api/dfc/Enterprises/10000/SocialMedias/facebook
|
||||||
dfc-b:name: Fred's Farm
|
dfc-b:name: Fred's Farm
|
||||||
dfc-b:hasDescription: This is an awesome enterprise
|
dfc-b:hasDescription: This is an awesome enterprise
|
||||||
dfc-b:VATnumber: 123 456
|
dfc-b:VATnumber: 123 456
|
||||||
dfc-b:manages: http://test.host/api/dfc/enterprises/10000/catalog_items/10001
|
dfc-b:manages: http://test.host/api/dfc/Enterprises/10000/CatalogItems/10001
|
||||||
dfc-b:supplies: http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
dfc-b:supplies: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
dfc-b:hasMainContact: http://test.host/api/dfc/persons/10000
|
dfc-b:hasMainContact: http://test.host/api/dfc/Persons/10000
|
||||||
dfc-b:logo: http://test.host/rails/active_storage/url/logo.png
|
dfc-b:logo: http://test.host/active_storage/url/logo.png
|
||||||
dfc-b:affiliates: http://test.host/api/dfc/enterprise_groups/60000
|
dfc-b:affiliates: http://test.host/api/dfc/Enterprises/60000
|
||||||
- "@id": http://test.host/api/dfc/addresses/40000
|
- "@id": http://test.host/api/dfc/Addresses/40000
|
||||||
"@type": dfc-b:Address
|
"@type": dfc-b:Address
|
||||||
dfc-b:hasStreet: 42 Doveton Street
|
dfc-b:hasStreet: 42 Doveton Street
|
||||||
dfc-b:hasPostalCode: '20170'
|
dfc-b:hasPostalCode: '20170'
|
||||||
dfc-b:hasCity: Herndon
|
dfc-b:hasCity: Herndon
|
||||||
dfc-b:hasCountry: Australia
|
dfc-b:hasCountry: USA
|
||||||
dfc-b:region: Victoria
|
dfc-b:region: Virginia
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
- "@id": http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
"@type": dfc-b:SuppliedProduct
|
"@type": dfc-b:SuppliedProduct
|
||||||
dfc-b:name: Apple - 1g
|
dfc-b:name: Apple - 1g
|
||||||
dfc-b:description: Round
|
dfc-b:description: Round
|
||||||
@@ -368,20 +369,20 @@ paths:
|
|||||||
dfc-b:lifetime: ''
|
dfc-b:lifetime: ''
|
||||||
dfc-b:usageOrStorageCondition: ''
|
dfc-b:usageOrStorageCondition: ''
|
||||||
dfc-b:totalTheoreticalStock: 0.0
|
dfc-b:totalTheoreticalStock: 0.0
|
||||||
dfc-b:image: http://test.host/rails/active_storage/url/logo-white.png
|
dfc-b:image: http://test.host/active_storage/url/logo-white.png
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000/catalog_items/10001
|
- "@id": http://test.host/api/dfc/Enterprises/10000/CatalogItems/10001
|
||||||
"@type": dfc-b:CatalogItem
|
"@type": dfc-b:CatalogItem
|
||||||
dfc-b:references: http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
dfc-b:references: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
dfc-b:sku: APP
|
dfc-b:sku: APP
|
||||||
dfc-b:stockLimitation: 5
|
dfc-b:stockLimitation: 5
|
||||||
dfc-b:offeredThrough: http://test.host/api/dfc/enterprises/10000/offers/10001
|
dfc-b:offeredThrough: http://test.host/api/dfc/Enterprises/10000/Offers/10001
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000/social_medias/facebook
|
- "@id": http://test.host/api/dfc/Enterprises/10000/SocialMedias/facebook
|
||||||
"@type": dfc-b:SocialMedia
|
"@type": dfc-b:SocialMedia
|
||||||
dfc-b:name: facebook
|
dfc-b:name: facebook
|
||||||
dfc-b:URL: https://facebook.com/user
|
dfc-b:URL: https://facebook.com/user
|
||||||
'404':
|
'404':
|
||||||
description: not found
|
description: not found
|
||||||
"/api/dfc/enterprises/{enterprise_id}/offers/{id}":
|
"/api/dfc/Enterprises/{enterprise_id}/Offers/{id}":
|
||||||
parameters:
|
parameters:
|
||||||
- name: enterprise_id
|
- name: enterprise_id
|
||||||
in: path
|
in: path
|
||||||
@@ -406,7 +407,7 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/offers/10001
|
"@id": http://test.host/api/dfc/Enterprises/10000/Offers/10001
|
||||||
"@type": dfc-b:Offer
|
"@type": dfc-b:Offer
|
||||||
dfc-b:hasPrice: 19.99
|
dfc-b:hasPrice: 19.99
|
||||||
dfc-b:stockLimitation: 5
|
dfc-b:stockLimitation: 5
|
||||||
@@ -424,11 +425,11 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
example:
|
example:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/offers/10001
|
"@id": http://test.host/api/dfc/Enterprises/10000/Offers/10001
|
||||||
"@type": dfc-b:Offer
|
"@type": dfc-b:Offer
|
||||||
dfc-b:hasPrice: 9.99
|
dfc-b:hasPrice: 9.99
|
||||||
dfc-b:stockLimitation: 7
|
dfc-b:stockLimitation: 7
|
||||||
"/api/dfc/persons/{id}":
|
"/api/dfc/Persons/{id}":
|
||||||
get:
|
get:
|
||||||
summary: Show person
|
summary: Show person
|
||||||
parameters:
|
parameters:
|
||||||
@@ -448,11 +449,11 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/persons/10000
|
"@id": http://test.host/api/dfc/Persons/10000
|
||||||
"@type": dfc-b:Person
|
"@type": dfc-b:Person
|
||||||
'404':
|
'404':
|
||||||
description: not found
|
description: not found
|
||||||
"/api/dfc/enterprises/{enterprise_id}/social_medias/{name}":
|
"/api/dfc/Enterprises/{enterprise_id}/SocialMedias/{name}":
|
||||||
get:
|
get:
|
||||||
summary: Show social media
|
summary: Show social media
|
||||||
parameters:
|
parameters:
|
||||||
@@ -477,14 +478,14 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/social_medias/facebook
|
"@id": http://test.host/api/dfc/Enterprises/10000/SocialMedias/facebook
|
||||||
"@type": dfc-b:SocialMedia
|
"@type": dfc-b:SocialMedia
|
||||||
dfc-b:name: facebook
|
dfc-b:name: facebook
|
||||||
dfc-b:URL: https://facebook.com/user
|
dfc-b:URL: https://facebook.com/user
|
||||||
'404':
|
'404':
|
||||||
description: URL to connect to a Social Media account.
|
description: URL to connect to a Social Media account.
|
||||||
|
|
||||||
"/api/dfc/enterprises/{enterprise_id}/suppliedproducts":
|
"/api/dfc/Enterprises/{enterprise_id}/SuppliedProducts":
|
||||||
parameters:
|
parameters:
|
||||||
- name: enterprise_id
|
- name: enterprise_id
|
||||||
in: path
|
in: path
|
||||||
@@ -504,7 +505,7 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
"@id": http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
"@type": dfc-b:SuppliedProduct
|
"@type": dfc-b:SuppliedProduct
|
||||||
dfc-b:name: Pesto - 1g
|
dfc-b:name: Pesto - 1g
|
||||||
dfc-b:description: Basil Pesto
|
dfc-b:description: Basil Pesto
|
||||||
@@ -517,7 +518,7 @@ paths:
|
|||||||
dfc-b:lifetime: ''
|
dfc-b:lifetime: ''
|
||||||
dfc-b:usageOrStorageCondition: ''
|
dfc-b:usageOrStorageCondition: ''
|
||||||
dfc-b:totalTheoreticalStock: 0.0
|
dfc-b:totalTheoreticalStock: 0.0
|
||||||
dfc-b:image: http://test.host/rails/active_storage/url/logo-white.png
|
dfc-b:image: http://test.host/active_storage/url/logo-white.png
|
||||||
'404':
|
'404':
|
||||||
description: not found
|
description: not found
|
||||||
post:
|
post:
|
||||||
@@ -536,7 +537,7 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
"@id": http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
"@type": dfc-b:SuppliedProduct
|
"@type": dfc-b:SuppliedProduct
|
||||||
dfc-b:name: Pesto - Apple (6g)
|
dfc-b:name: Pesto - Apple (6g)
|
||||||
dfc-b:description: A delicious heritage apple
|
dfc-b:description: A delicious heritage apple
|
||||||
@@ -549,14 +550,14 @@ paths:
|
|||||||
dfc-b:lifetime: ''
|
dfc-b:lifetime: ''
|
||||||
dfc-b:usageOrStorageCondition: ''
|
dfc-b:usageOrStorageCondition: ''
|
||||||
dfc-b:totalTheoreticalStock: 0.0
|
dfc-b:totalTheoreticalStock: 0.0
|
||||||
dfc-b:image: http://test.host/rails/active_storage/url/logo-white.png
|
dfc-b:image: http://test.host/active_storage/url/logo-white.png
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
example:
|
example:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/6201/suppliedproducts/0
|
"@id": http://test.host/api/dfc/Enterprises/6201/SuppliedProducts/0
|
||||||
"@type": dfc-b:SuppliedProduct
|
"@type": dfc-b:SuppliedProduct
|
||||||
dfc-b:name: Apple
|
dfc-b:name: Apple
|
||||||
dfc-b:description: A delicious heritage apple
|
dfc-b:description: A delicious heritage apple
|
||||||
@@ -570,7 +571,7 @@ paths:
|
|||||||
dfc-b:usageOrStorageCondition: ''
|
dfc-b:usageOrStorageCondition: ''
|
||||||
dfc-b:totalTheoreticalStock: 0.0
|
dfc-b:totalTheoreticalStock: 0.0
|
||||||
|
|
||||||
"/api/dfc/enterprises/{enterprise_id}/suppliedproducts/{id}":
|
"/api/dfc/Enterprises/{enterprise_id}/SuppliedProducts/{id}":
|
||||||
parameters:
|
parameters:
|
||||||
- name: enterprise_id
|
- name: enterprise_id
|
||||||
in: path
|
in: path
|
||||||
@@ -595,7 +596,7 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
"@id": http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
"@type": dfc-b:SuppliedProduct
|
"@type": dfc-b:SuppliedProduct
|
||||||
dfc-b:name: Pesto - 300g
|
dfc-b:name: Pesto - 300g
|
||||||
dfc-b:description: Basil Pesto
|
dfc-b:description: Basil Pesto
|
||||||
@@ -686,7 +687,7 @@ paths:
|
|||||||
"@type": "@id"
|
"@type": "@id"
|
||||||
dfc-t:represent:
|
dfc-t:represent:
|
||||||
"@type": "@id"
|
"@type": "@id"
|
||||||
"@id": http://test.host/api/dfc/enterprises/10001/suppliedproducts/10001
|
"@id": http://test.host/api/dfc/Enterprises/10001/SuppliedProducts/10001
|
||||||
"@type": dfc-b:SuppliedProduct
|
"@type": dfc-b:SuppliedProduct
|
||||||
dfc-b:alcoholPercentage: 0
|
dfc-b:alcoholPercentage: 0
|
||||||
dfc-b:description: Ali's Amazing Red Pesto - now it's red!
|
dfc-b:description: Ali's Amazing Red Pesto - now it's red!
|
||||||
@@ -704,7 +705,7 @@ paths:
|
|||||||
dfc-b:hasNutrientCharacteristic: []
|
dfc-b:hasNutrientCharacteristic: []
|
||||||
dfc-b:hasAllergenCharacteristic: []
|
dfc-b:hasAllergenCharacteristic: []
|
||||||
|
|
||||||
"/api/dfc/enterprises/{enterprise_id}/orders":
|
"/api/dfc/Enterprises/{enterprise_id}/orders":
|
||||||
parameters:
|
parameters:
|
||||||
- name: enterprise_id
|
- name: enterprise_id
|
||||||
in: path
|
in: path
|
||||||
@@ -724,9 +725,9 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/orders/10001
|
"@id": http://test.host/api/dfc/Enterprises/10000/orders/10001
|
||||||
"@type": dfc-b:Order
|
"@type": dfc-b:Order
|
||||||
dfc-b:belongsTo: http://test.host/api/dfc/enterprises/10000/salessessions/10002
|
dfc-b:belongsTo: http://test.host/api/dfc/Enterprises/10000/salessessions/10002
|
||||||
dfc-b:orderNumber: "MYORDERNUM:12345"
|
dfc-b:orderNumber: "MYORDERNUM:12345"
|
||||||
dfc-b:hasOrderStatus: dfc-v:Draft
|
dfc-b:hasOrderStatus: dfc-v:Draft
|
||||||
dfc-b:hasFulfilmentStatus: dfc-v:Held
|
dfc-b:hasFulfilmentStatus: dfc-v:Held
|
||||||
@@ -741,19 +742,19 @@ paths:
|
|||||||
dfc-b:value: £0.27
|
dfc-b:value: £0.27
|
||||||
dfc-b:VATrate: 0.00
|
dfc-b:VATrate: 0.00
|
||||||
dfc-b:discount: 1.55
|
dfc-b:discount: 1.55
|
||||||
dfc-b:OrderedBy: http://test.host/api/dfc/persons/10000
|
dfc-b:OrderedBy: http://test.host/api/dfc/Persons/10000
|
||||||
dfc-b:selects:
|
dfc-b:selects:
|
||||||
"@type": dfc-b:ShippingOption
|
"@type": dfc-b:ShippingOption
|
||||||
dfc-b:optionOf: http://test.host/api/dfc/enterprises/10000/salessessions/10002
|
dfc-b:optionOf: http://test.host/api/dfc/Enterprises/10000/salessessions/10002
|
||||||
dfc-b:fee: 1.50
|
dfc-b:fee: 1.50
|
||||||
dfc-b:uses:
|
dfc-b:uses:
|
||||||
"@type": dfc-b:PickupOption
|
"@type": dfc-b:PickupOption
|
||||||
dfc-b:pickedUpAt: Our Fantastic Farm Gate
|
dfc-b:pickedUpAt: Our Fantastic Farm Gate
|
||||||
dfc-b:soldBy: http://test.host/api/dfc/enterprises/10000
|
dfc-b:soldBy: http://test.host/api/dfc/Enterprises/10000
|
||||||
dfc-b:hasPart:
|
dfc-b:hasPart:
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000/orders/10001/orderlines/10001-01
|
- "@id": http://test.host/api/dfc/Enterprises/10000/orders/10001/orderlines/10001-01
|
||||||
"@type": dfc-b:OrderLine
|
"@type": dfc-b:OrderLine
|
||||||
dfc-b:concerns: http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
dfc-b:concerns: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
dfc-b:hasQuantity:
|
dfc-b:hasQuantity:
|
||||||
"@type": dfc-b:QuantitativeValue
|
"@type": dfc-b:QuantitativeValue
|
||||||
dfc-b:hasUnit: Packet
|
dfc-b:hasUnit: Packet
|
||||||
@@ -764,9 +765,8 @@ paths:
|
|||||||
dfc-b:value: 19.95
|
dfc-b:value: 19.95
|
||||||
dfc-b:VATrate: 0.0
|
dfc-b:VATrate: 0.0
|
||||||
dfc-b:discount: []
|
dfc-b:discount: []
|
||||||
dfc-b:hasPart: http://test.host/api/dfc/enterprises/10000/orders/10001/orderlines/10001-012
|
|
||||||
post:
|
post:
|
||||||
Summary: Create an Order
|
summary: Create an Order
|
||||||
parameters: []
|
parameters: []
|
||||||
tags:
|
tags:
|
||||||
- Orders
|
- Orders
|
||||||
@@ -781,9 +781,9 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/orders/10001
|
"@id": http://test.host/api/dfc/Enterprises/10000/orders/10001
|
||||||
"@type": dfc-b:Order
|
"@type": dfc-b:Order
|
||||||
dfc-b:belongsTo: http://test.host/api/dfc/enterprises/10000/salessessions/10002
|
dfc-b:belongsTo: http://test.host/api/dfc/Enterprises/10000/salessessions/10002
|
||||||
dfc-b:orderNumber: "MYORDERNUM:12345"
|
dfc-b:orderNumber: "MYORDERNUM:12345"
|
||||||
dfc-b:hasOrderStatus: dfc-v:Draft
|
dfc-b:hasOrderStatus: dfc-v:Draft
|
||||||
dfc-b:hasFulfilmentStatus: dfc-v:Held
|
dfc-b:hasFulfilmentStatus: dfc-v:Held
|
||||||
@@ -798,20 +798,53 @@ paths:
|
|||||||
dfc-b:value: £0.27
|
dfc-b:value: £0.27
|
||||||
dfc-b:VATrate: 0.00
|
dfc-b:VATrate: 0.00
|
||||||
dfc-b:discount: 1.55
|
dfc-b:discount: 1.55
|
||||||
dfc-b:OrderedBy: http://test.host/api/dfc/persons/10000
|
dfc-b:OrderedBy: http://test.host/api/dfc/Persons/10000
|
||||||
dfc-b:selects:
|
dfc-b:selects:
|
||||||
"@type": dfc-b:ShippingOption
|
"@type": dfc-b:ShippingOption
|
||||||
dfc-b:optionOf: http://test.host/api/dfc/enterprises/10000/salessessions/10002
|
dfc-b:optionOf: http://test.host/api/dfc/Enterprises/10000/salessessions/10002
|
||||||
dfc-b:fee: 1.50
|
dfc-b:fee: 1.50
|
||||||
dfc-b:uses:
|
dfc-b:uses:
|
||||||
"@type": dfc-b:PickupOption
|
"@type": dfc-b:PickupOption
|
||||||
dfc-b:pickedUpAt: Our Fantastic Farm Gate
|
dfc-b:pickedUpAt: Our Fantastic Farm Gate
|
||||||
dfc-b:soldBy: http://test.host/api/dfc/enterprises/10000
|
dfc-b:soldBy: http://test.host/api/dfc/Enterprises/10000
|
||||||
dfc-b:hasPart: http://test.host/api/dfc/enterprises/10000/orders/10001/orderlines/10001-01
|
dfc-b:hasPart: http://test.host/api/dfc/Enterprises/10000/orders/10001/orderlines/10001-01
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
example:
|
||||||
|
"@context": https://www.datafoodconsortium.org
|
||||||
|
"@id": http://test.host/api/dfc/Enterprises/10000/orders/10001
|
||||||
|
"@type": dfc-b:Order
|
||||||
|
dfc-b:belongsTo: http://test.host/api/dfc/Enterprises/10000/salessessions/10002
|
||||||
|
dfc-b:orderNumber: "MYORDERNUM:12345"
|
||||||
|
dfc-b:hasOrderStatus: dfc-v:Draft
|
||||||
|
dfc-b:hasFulfilmentStatus: dfc-v:Held
|
||||||
|
dfc-b:hasPaymentState: dfc-v:Unpaid
|
||||||
|
dfc-b:hasPaymentMethod:
|
||||||
|
"@type": dfc-b:PaymentMethod
|
||||||
|
dfc-b:paymentMethodType: Example Card PaymentMethod
|
||||||
|
dfc-b:paymentMethodProvider: Stripe
|
||||||
|
dfc-b:hasPrice:
|
||||||
|
"@type": dfc-b:QuantitativeValue
|
||||||
|
dfc-b:hasUnit: GBP
|
||||||
|
dfc-b:value: £0.27
|
||||||
|
dfc-b:VATrate: 0.00
|
||||||
|
dfc-b:discount: 1.55
|
||||||
|
dfc-b:OrderedBy: http://test.host/api/dfc/Persons/10000
|
||||||
|
dfc-b:selects:
|
||||||
|
"@type": dfc-b:ShippingOption
|
||||||
|
dfc-b:optionOf: http://test.host/api/dfc/Enterprises/10000/salessessions/10002
|
||||||
|
dfc-b:fee: 1.50
|
||||||
|
dfc-b:uses:
|
||||||
|
"@type": dfc-b:PickupOption
|
||||||
|
dfc-b:pickedUpAt: Our Fantastic Farm Gate
|
||||||
|
dfc-b:soldBy: http://test.host/api/dfc/Enterprises/10000
|
||||||
|
dfc-b:hasPart: http://test.host/api/dfc/Enterprises/10000/orders/10001/orderlines/10001-01
|
||||||
'404':
|
'404':
|
||||||
description: not found
|
description: not found
|
||||||
|
|
||||||
"/api/dfc/enterprises/{enterprise_id}/orders/{id}":
|
"/api/dfc/Enterprises/{enterprise_id}/orders/{id}":
|
||||||
parameters:
|
parameters:
|
||||||
- name: enterprise_id
|
- name: enterprise_id
|
||||||
in: path
|
in: path
|
||||||
@@ -836,9 +869,9 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/orders/10001
|
"@id": http://test.host/api/dfc/Enterprises/10000/orders/10001
|
||||||
"@type": dfc-b:Order
|
"@type": dfc-b:Order
|
||||||
dfc-b:belongsTo: http://test.host/api/dfc/enterprises/10000/salessessions/10002
|
dfc-b:belongsTo: http://test.host/api/dfc/Enterprises/10000/salessessions/10002
|
||||||
dfc-b:orderNumber: "MYORDERNUM:12345"
|
dfc-b:orderNumber: "MYORDERNUM:12345"
|
||||||
dfc-b:hasOrderStatus: dfc-v:Draft
|
dfc-b:hasOrderStatus: dfc-v:Draft
|
||||||
dfc-b:hasFulfilmentStatus: dfc-v:Held
|
dfc-b:hasFulfilmentStatus: dfc-v:Held
|
||||||
@@ -853,19 +886,19 @@ paths:
|
|||||||
dfc-b:value: £0.27
|
dfc-b:value: £0.27
|
||||||
dfc-b:VATrate: 0.00
|
dfc-b:VATrate: 0.00
|
||||||
dfc-b:discount: 1.55
|
dfc-b:discount: 1.55
|
||||||
dfc-b:OrderedBy: http://test.host/api/dfc/persons/10000
|
dfc-b:OrderedBy: http://test.host/api/dfc/Persons/10000
|
||||||
dfc-b:selects:
|
dfc-b:selects:
|
||||||
"@type": dfc-b:ShippingOption
|
"@type": dfc-b:ShippingOption
|
||||||
dfc-b:optionOf: http://test.host/api/dfc/enterprises/10000/salessessions/10002
|
dfc-b:optionOf: http://test.host/api/dfc/Enterprises/10000/salessessions/10002
|
||||||
dfc-b:fee: 1.50
|
dfc-b:fee: 1.50
|
||||||
dfc-b:uses:
|
dfc-b:uses:
|
||||||
"@type": dfc-b:PickupOption
|
"@type": dfc-b:PickupOption
|
||||||
dfc-b:pickedUpAt: Our Fantastic Farm Gate
|
dfc-b:pickedUpAt: Our Fantastic Farm Gate
|
||||||
dfc-b:soldBy: http://test.host/api/dfc/enterprises/10000
|
dfc-b:soldBy: http://test.host/api/dfc/Enterprises/10000
|
||||||
dfc-b:hasPart:
|
dfc-b:hasPart:
|
||||||
- "@id": http://test.host/api/dfc/enterprises/10000/orders/10001/orderlines/10001-01
|
- "@id": http://test.host/api/dfc/Enterprises/10000/orders/10001/orderlines/10001-01
|
||||||
"@type": dfc-b:OrderLine
|
"@type": dfc-b:OrderLine
|
||||||
dfc-b:concerns: http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
dfc-b:concerns: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
dfc-b:hasQuantity:
|
dfc-b:hasQuantity:
|
||||||
"@type": dfc-b:QuantitativeValue
|
"@type": dfc-b:QuantitativeValue
|
||||||
dfc-b:hasUnit: Packet
|
dfc-b:hasUnit: Packet
|
||||||
@@ -876,12 +909,11 @@ paths:
|
|||||||
dfc-b:value: 19.95
|
dfc-b:value: 19.95
|
||||||
dfc-b:VATrate: 0.0
|
dfc-b:VATrate: 0.0
|
||||||
dfc-b:discount: []
|
dfc-b:discount: []
|
||||||
dfc-b:hasPart: http://test.host/api/dfc/enterprises/10000/orders/10001/orderlines/10001-012
|
|
||||||
'404':
|
'404':
|
||||||
description: not found
|
description: not found
|
||||||
|
|
||||||
|
|
||||||
"/api/dfc/enterprises/{enterprise_id}/orders/{order_id}/orderlines":
|
"/api/dfc/Enterprises/{enterprise_id}/orders/{order_id}/orderlines":
|
||||||
parameters:
|
parameters:
|
||||||
- name: enterprise_id
|
- name: enterprise_id
|
||||||
in: path
|
in: path
|
||||||
@@ -906,10 +938,10 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/orders/10001/orderlines/10001-01
|
"@id": http://test.host/api/dfc/Enterprises/10000/orders/10001/orderlines/10001-01
|
||||||
"@type": dfc-b:OrderLine
|
"@type": dfc-b:OrderLine
|
||||||
dfc-b:concerns: http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
dfc-b:concerns: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
dfc-b:partOf: http://test.host/api/dfc/enterprises/10000/orders/10001
|
dfc-b:partOf: http://test.host/api/dfc/Enterprises/10000/orders/10001
|
||||||
dfc-b:hasQuantity:
|
dfc-b:hasQuantity:
|
||||||
"@type": dfc-b:QuantitativeValue
|
"@type": dfc-b:QuantitativeValue
|
||||||
dfc-b:hasUnit: Packet
|
dfc-b:hasUnit: Packet
|
||||||
@@ -938,10 +970,10 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/orders/10001/orderlines/10001-01
|
"@id": http://test.host/api/dfc/Enterprises/10000/orders/10001/orderlines/10001-01
|
||||||
"@type": dfc-b:OrderLine
|
"@type": dfc-b:OrderLine
|
||||||
dfc-b:concerns: http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
dfc-b:concerns: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
dfc-b:partOf: http://test.host/api/dfc/enterprises/10000/orders/10001
|
dfc-b:partOf: http://test.host/api/dfc/Enterprises/10000/orders/10001
|
||||||
dfc-b:hasQuantity:
|
dfc-b:hasQuantity:
|
||||||
"@type": dfc-b:QuantitativeValue
|
"@type": dfc-b:QuantitativeValue
|
||||||
dfc-b:hasUnit: Packet
|
dfc-b:hasUnit: Packet
|
||||||
@@ -952,10 +984,30 @@ paths:
|
|||||||
dfc-b:value: 19.95
|
dfc-b:value: 19.95
|
||||||
dfc-b:VATrate: 0.0
|
dfc-b:VATrate: 0.0
|
||||||
dfc-b:discount: 2.95
|
dfc-b:discount: 2.95
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
example:
|
||||||
|
"@context": https://www.datafoodconsortium.org
|
||||||
|
"@id": http://test.host/api/dfc/Enterprises/10000/orders/10001/orderlines/10001-01
|
||||||
|
"@type": dfc-b:OrderLine
|
||||||
|
dfc-b:concerns: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
|
dfc-b:partOf: http://test.host/api/dfc/Enterprises/10000/orders/10001
|
||||||
|
dfc-b:hasQuantity:
|
||||||
|
"@type": dfc-b:QuantitativeValue
|
||||||
|
dfc-b:hasUnit: Packet
|
||||||
|
dfc-b:hasValue: 5.0
|
||||||
|
dfc-b:Price:
|
||||||
|
"@type": dfc-b:QuantitativeValue
|
||||||
|
dfc-b:hasUnit: GBP
|
||||||
|
dfc-b:value: 19.95
|
||||||
|
dfc-b:VATrate: 0.0
|
||||||
|
dfc-b:discount: 2.95
|
||||||
'404':
|
'404':
|
||||||
description: not found
|
description: not found
|
||||||
|
|
||||||
"/api/dfc/enterprises/{enterprise_id}/orders/{order_id}/orderlines/{id}":
|
"/api/dfc/Enterprises/{enterprise_id}/orders/{order_id}/orderlines/{id}":
|
||||||
parameters:
|
parameters:
|
||||||
- name: enterprise_id
|
- name: enterprise_id
|
||||||
in: path
|
in: path
|
||||||
@@ -985,10 +1037,10 @@ paths:
|
|||||||
test_example:
|
test_example:
|
||||||
value:
|
value:
|
||||||
"@context": https://www.datafoodconsortium.org
|
"@context": https://www.datafoodconsortium.org
|
||||||
"@id": http://test.host/api/dfc/enterprises/10000/orders/10001/orderlines/10001-01
|
"@id": http://test.host/api/dfc/Enterprises/10000/orders/10001/orderlines/10001-01
|
||||||
"@type": dfc-b:OrderLine
|
"@type": dfc-b:OrderLine
|
||||||
dfc-b:concerns: http://test.host/api/dfc/enterprises/10000/suppliedproducts/10001
|
dfc-b:concerns: http://test.host/api/dfc/Enterprises/10000/SuppliedProducts/10001
|
||||||
dfc-b:partOf: http://test.host/api/dfc/enterprises/10000/orders/10001
|
dfc-b:partOf: http://test.host/api/dfc/Enterprises/10000/orders/10001
|
||||||
dfc-b:hasQuantity:
|
dfc-b:hasQuantity:
|
||||||
"@type": dfc-b:QuantitativeValue
|
"@type": dfc-b:QuantitativeValue
|
||||||
dfc-b:hasUnit: Packet
|
dfc-b:hasUnit: Packet
|
||||||
|
|||||||
Reference in New Issue
Block a user