-
Notifications
You must be signed in to change notification settings - Fork 35
/
Invoice.yml
493 lines (493 loc) · 14.8 KB
/
Invoice.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
$linkedData:
term: Invoice
'@id': https://schema.org/Invoice
title: Invoice
description: A statement of the money due for goods or services; a bill.
type: object
properties:
type:
type: array
readOnly: true
const:
- Invoice
default:
- Invoice
items:
type: string
enum:
- Invoice
identifier:
title: Property Identifier
description: Identifiers for a property.
type: string
$linkedData:
term: identifier
'@id': https://schema.org/identifier
invoiceNumber:
title: Invoice Number
description: Invoice Number.
type: string
$linkedData:
term: invoiceNumber
'@id': https://vocabulary.uncefact.org/invoiceIssuerReference
customerReferenceNumber:
title: Customer's Reference Number
description: Oversees customer’s reference number.
type: string
$linkedData:
term: customerReferenceNumber
'@id': https://vocabulary.uncefact.org/ReferenceCodeList#CR
referencesOrder:
title: References Order
description: The Order(s) related to this Invoice. One or more Orders may be combined into a single Invoice.
type: array
items:
type: string
$linkedData:
term: referencesOrder
'@id': https://schema.org/referencesOrder
billOfLadingNumber:
title: Bill of Lading Number
description: Carrier-issued number for the associated Bill of Lading or Waybill.
type: string
$linkedData:
term: billOfLadingNumber
'@id': >-
https://vocabulary.uncefact.org/ReferenceCodeList#BM
letterOfCreditNumber:
title: Letter of Credit Number
description: A letter of credit document referenced in the trade agreement or settlement.
type: string
$linkedData:
term: letterOfCreditNumber
'@id': https://vocabulary.uncefact.org/letterOfCreditDocument
portOfEntry:
title: Port Of Entry
description: Port where the purchased goods will enter first.
$ref: ./Place.yml
$linkedData:
term: portOfEntry
'@id': https://schema.org/Place
originCountry:
title: Origin Country
description: A country of origin for the consignment, consignment item, or product.
type: string
$linkedData:
term: originCountry
'@id': https://vocabulary.uncefact.org/originCountry
destinationCountry:
title: Destination Country
description: Country to which the purchased product will be delivered
type: string
$linkedData:
term: destinationCountry
'@id': https://vocabulary.uncefact.org/destinationCountry
invoiceDate:
title: Invoice Date
description: A date, time, date time, or other date time value of the invoice in the trade settlement.
type: string
$linkedData:
term: invoiceDate
'@id': https://vocabulary.uncefact.org/invoiceDateTime
'@type': http://www.w3.org/2001/XMLSchema#dateTime
purchaseDate:
title: Purchase Date
description: The date that payment is made.
type: string
$linkedData:
term: purchaseDate
'@id': https://schema.org/paymentDueDate
seller:
title: Seller
description: An entity which offers (sells, leases, lends, or loans) the services or goods. A seller may also be a provider.
$ref: ../snippets/SellerParty.yml
$linkedData:
term: seller
'@id': https://vocabulary.uncefact.org/sellerParty
buyer:
title: Buyer
description: Importer of record. Party placing the order or paying the invoice.
$ref: ../snippets/BuyerParty.yml
$linkedData:
term: buyer
'@id': https://vocabulary.uncefact.org/buyerParty
consignee:
title: Consignee
description: The consignee party for this supply chain consignment.
type: array
items:
$ref: ../snippets/ConsigneeParty.yml
$linkedData:
term: consignee
'@id': https://vocabulary.uncefact.org/consigneeParty
itemsShipped:
title: Items Shipped
description: Itemized list of shipped goods.
type: array
items:
type: object
properties:
type:
type: array
readOnly: true
const:
- TradeLineItem
default:
- TradeLineItem
items:
type: string
enum:
- TradeLineItem
name:
title: Name
description: Name of the Tradeline item.
type: string
description:
title: Description of product
type: string
product:
title: Product
description: Product details.
type: object
properties:
type:
type: array
readOnly: true
const:
- Product
default:
- Product
items:
type: string
enum:
- Product
id:
title: Product Identifier
description: The product identifier, such as ISBN.
type: string
gtin:
title: Global Trade Item Number (GTIN)
type: string
manufacturer:
title: Manufacturer
description: The entity manufacturing the product.
$ref: ../snippets/ManufacturerParty.yml
name:
title: Name
description: Product name.
type: string
description:
title: Description
description: Product description.
type: string
category:
title: Category
description: A category for the item.
type: string
sizeOrAmount:
title: Size or Amount
description: The size or amount of the product
$ref: ./QuantitativeValue.yml
weight:
title: Weight
description: Weight of the product.
$ref: ./QuantitativeValue.yml
productPrice:
title: Product Price
description: >-
One or more detailed price specifications, indicating the unit price and
delivery or payment charges.
$ref: ./PriceSpecification.yml
sku:
title: SKU Number
description: >-
The Stock Keeping Unit (SKU), i.e., a merchant-specific identifier for a
product or service, or for the product to which the offer refers.
type: string
batchNumber:
title: Batch Number
description: A tracking number for commodities
type: string
commodity:
title: Commodity
description: Product commodity code, codification system and description
$ref: ./Commodity.yml
additionalProperties: false
required:
- type
itemCount:
title: Item Count
description: A quantity despatched in the trade delivery.
type: number
freeTradeAgreement:
title: Free Trade Agreement
description: Relevant Free Trade Agreement
type: string
countryOfOrigin:
title: Country of Origin
description: Identify the 2-digit ISO country code of the country of production.
netWeight:
title: Trade Line Item Net Weight
description: A measure of the net weight (mass).
$ref: ./QuantitativeValue.yml
grossWeight:
title: Trade Line Item Gross Weight
description: >-
A measure of the gross weight (mass) which includes packaging but excludes
any transport equipment.
$ref: ./QuantitativeValue.yml
lineItemTotalPrice:
title: Total Price
description: Total line item price.
$ref: ./PriceSpecification.yml
additionalProperties: false
required:
- type
$linkedData:
term: itemsShipped
'@id': https://schema.org/itemShipped
comments:
title: Comments
description: Free text comments.
type: array
items:
type: string
$linkedData:
term: comments
'@id': https://schema.org/Comment
packageQuantity:
title: Package Quantity
description: Total number of packages.
type: number
$linkedData:
term: packageQuantity
'@id': https://vocabulary.uncefact.org/packageQuantity
totalWeight:
title: Total Weight
description: Total weight of the products.
$ref: ./QuantitativeValue.yml
$linkedData:
term: totalWeight
'@id': https://schema.org/weight
termsOfDelivery:
title: Terms of Delivery
description: The conditions agreed upon between the parties with regard to the delivery of goods and or services.
type: string
$linkedData:
term: termsOfDelivery
'@id': https://vocabulary.uncefact.org/specifiedDeliveryTerms
termsOfPayment:
title: Terms of Payment
description: Terms, conditions, and currency of settlement, as agreed upon by the vendor and purchaser per the pro forma invoice, customer purchase order, and/or the letter of credit.
type: string
$linkedData:
term: termsOfPayment
'@id': https://vocabulary.uncefact.org/specifiedPaymentTerms
currencyOfSettlement:
title: Terms of Settlement
description: Currency agreed upon between seller and buyer as payment.
type: string
$linkedData:
term: termsOfSettlement
'@id': https://schema.org/currency
invoiceSubtotal:
title: Invoice Subtotal
description: The subtotal of line items.
$ref: ./PriceSpecification.yml
$linkedData:
term: totalPaymentDue
'@id': https://schema.org/totalPaymentDue
discounts:
title: Discounts
description: Applicable discounts.
type: array
items:
$ref: ./PriceSpecification.yml
$linkedData:
term: discounts
'@id': https://schema.org/discount
deductions:
title: Additions
description: Applicable additions.
type: array
items:
$ref: ./PriceSpecification.yml
$linkedData:
term: deductions
'@id': https://vocabulary.uncefact.org/deductionAmount
tax:
title: Tax
description: Applicable tax.
$ref: ./PriceSpecification.yml
$linkedData:
term: tax
'@id': https://vocabulary.uncefact.org/taxTotalAmount
freightCost:
title: Freight Cost
description: Included cost of freight.
$ref: ./PriceSpecification.yml
$linkedData:
term: freightCost
'@id': https://schema.org/DeliveryChargeSpecification
insuranceCost:
title: Freight Cost
description: Included cost of insurance.
$ref: ./PriceSpecification.yml
$linkedData:
term: insuranceCost
'@id': https://vocabulary.uncefact.org/insuranceChargeTotalAmount
totalPaymentDue:
title: Total Payment Due
description: The total amount due.
$ref: ./PriceSpecification.yml
$linkedData:
term: totalPaymentDue
'@id': https://schema.org/totalPaymentDue
additionalProperties: false
required:
- type
- seller
- buyer
- itemsShipped
- totalPaymentDue
example: |-
{
"type": ["Invoice"],
"portOfEntry": {
"type": ["Place"],
"unLocode": "USLGB"
},
"destinationCountry": "MX",
"purchaseDate": "2021-02-21",
"seller": {
"type": ["Organization"],
"name": "Maxi Acero Mexicano",
"location": {
"type": ["Place"],
"address": {
"type": ["PostalAddress"],
"streetAddress": "Avenida Carlos 100",
"addressLocality": "Hernádez de Mara",
"addressRegion": "Nuevo Leon",
"postalCode": "32200",
"addressCountry": "Mexico"
}
},
"email": "info@example.net",
"phoneNumber": "+1-948-555-4838"
},
"buyer": {
"type": [
"Organization"
],
"id": "did:web:generic-motors.example.com",
"location": {
"type": ["Place"],
"address": {
"type": [
"PostalAddress"
],
"name": "Generic Motors of America",
"streetAddress": "12 Generic Motors Dr",
"addressLocality": "Detroit",
"addressRegion": "Michigain",
"postalCode": "48232-5170",
"addressCountry": "USA"
}
}
},
"consignee": [{
"type": [
"Organization"
],
"id": "did:web:generic-motors.example.com"
}],
"itemsShipped": [
{
"type": ["TradeLineItem"],
"product": {
"type": ["Product"],
"manufacturer": {
"type": ["Organization"],
"name": "Maxi Acero Mexicano",
"location": {
"type": ["Place"],
"address": {
"type": ["PostalAddress"],
"streetAddress": "Avenida Carlos 100",
"addressLocality": "Hernádez de Mara",
"addressRegion": "Nuevo Leon",
"postalCode": "32200",
"addressCountry": "Mexico"
}
}
},
"description": "UNS S30400 chromium-nickel stainless steel rolls.",
"weight": {
"type": ["QuantitativeValue"],
"unitCode": "lbs",
"value": "16500"
}
},
"itemCount": 5,
"grossWeight": {
"type": ["QuantitativeValue"],
"value": "82500",
"unitCode": "lbs"
},
"lineItemTotalPrice": {
"type": ["PriceSpecification"],
"price": 5200,
"priceCurrency": "USD"
}
},
{
"type": ["TradeLineItem"],
"product": {
"type": ["Product"],
"manufacturer": {
"type": ["Organization"],
"name": "Maxi Acero Mexicano",
"location": {
"type": ["Place"],
"address": {
"type": ["PostalAddress"],
"streetAddress": "Avenida Carlos 100",
"addressLocality": "Hernádez de Mara",
"addressRegion": "Nuevo Leon",
"postalCode": "32200",
"addressCountry": "Mexico"
}
}
},
"description": "Galvalannealed ASTM A-653 zinc-iron alloy-coated steel sheets.",
"weight": {
"type": ["QuantitativeValue"],
"value": "12680",
"unitCode": "lbs"
}
},
"itemCount": 20,
"grossWeight": {
"type": ["QuantitativeValue"],
"value": "253600",
"unitCode": "lbs"
},
"lineItemTotalPrice": {
"type": ["PriceSpecification"],
"price": 4400,
"priceCurrency": "USD"
}
}
],
"totalWeight": {
"type": ["QuantitativeValue"],
"value": "336100",
"unitCode": "lbs"
},
"totalPaymentDue": {
"type": ["PriceSpecification"],
"price": 9600,
"priceCurrency": "USD"
}
}