Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.12 KB | None | 0 0
  1. openapi: 3.0.0
  2. info:
  3. version: "1.0.1-oas3"
  4. title: FreeTradeAnalytics API
  5. description: The Data Inteface of FreeTradeAnalytics
  6. paths:
  7. /material:
  8. post:
  9. tags:
  10. - material
  11. responses:
  12. '200':
  13. description: Created without errors
  14. content:
  15. application/json:
  16. schema:
  17. $ref: '#/components/schemas/post_okresponse'
  18. '205':
  19. description: Created with errors
  20. content:
  21. application/json:
  22. schema:
  23. $ref: '#/components/schemas/post_witherrors'
  24.  
  25. requestBody:
  26. $ref: '#/components/requestBodies/material'
  27. patch:
  28. tags:
  29. - material
  30. responses:
  31. '200':
  32. description: Updated
  33. content:
  34. application/json:
  35. schema:
  36. $ref: '#/components/schemas/patch_response'
  37. requestBody:
  38. $ref: '#/components/requestBodies/material'
  39. /bom:
  40. post:
  41. tags:
  42. - bom
  43. responses:
  44. '201':
  45. description: Created
  46. requestBody:
  47. $ref: '#/components/requestBodies/bom'
  48. patch:
  49. tags:
  50. - bom
  51. responses:
  52. '204':
  53. description: No Content
  54. requestBody:
  55. $ref: '#/components/requestBodies/bom'
  56. /bom_item:
  57. post:
  58. tags:
  59. - bom_item
  60. responses:
  61. '201':
  62. description: Created
  63. requestBody:
  64. $ref: '#/components/requestBodies/bom_item'
  65. patch:
  66. tags:
  67. - bom_item
  68. responses:
  69. '204':
  70. description: No Content
  71. requestBody:
  72. $ref: '#/components/requestBodies/bom_item'
  73. /material_source:
  74. post:
  75. tags:
  76. - material_source
  77. responses:
  78. '201':
  79. description: Created
  80. requestBody:
  81. $ref: '#/components/requestBodies/bom'
  82. patch:
  83. tags:
  84. - material_source
  85. responses:
  86. '204':
  87. description: No Content
  88. /supplier:
  89. post:
  90. tags:
  91. - supplier
  92. responses:
  93. '201':
  94. description: Created
  95. requestBody:
  96. $ref: '#/components/requestBodies/supplier'
  97. patch:
  98. tags:
  99. - supplier
  100. parameters:
  101. - $ref: '#/components/parameters/rowFilter.supplierid'
  102. responses:
  103. '204':
  104. description: No Content
  105. /classification:
  106. get:
  107. tags:
  108. - classification
  109. parameters:
  110. - $ref: '#/components/parameters/rowFilter.materialno'
  111. - $ref: '#/components/parameters/rowFilter.legalregulationid'
  112. - $ref: '#/components/parameters/rowFilter.effectiveDate'
  113. responses:
  114. '200':
  115. description: OK
  116. content:
  117. application/json:
  118. schema:
  119. type: array
  120. items:
  121. $ref: '#/components/schemas/classification'
  122.  
  123. '206':
  124. description: Partial Content
  125. post:
  126. tags:
  127. - classification
  128. responses:
  129. '201':
  130. description: Created
  131. requestBody:
  132. $ref: '#/components/requestBodies/classification'
  133. patch:
  134. tags:
  135. - classification
  136. parameters:
  137. - $ref: '#/components/parameters/rowFilter.materialno'
  138. - $ref: '#/components/parameters/rowFilter.legalregulationid'
  139. - $ref: '#/components/parameters/rowFilter.effectiveDate'
  140. responses:
  141. '204':
  142. description: No Content
  143. requestBody:
  144. $ref: '#/components/requestBodies/classification'
  145. externalDocs:
  146. url: 'https://www.freetradeanalytics.com/support/documentation/API'
  147. description: 'FreeTradeAnalytics API Documentation'
  148. servers:
  149. - url: 'https://virtserver.swaggerhub.com/freetradeanalytics/fta-api/1.0.1'
  150. - url: 'http://virtserver.swaggerhub.com/freetradeanalytics/fta-api/1.0.1'
  151. components:
  152. parameters:
  153. rowFilter.materialno:
  154. name: materialno
  155. required: false
  156. in: query
  157. schema:
  158. type: array
  159. items:
  160. format: string
  161. type: string
  162. rowFilter.materialversion:
  163. name: materialversion
  164. required: false
  165. in: query
  166. schema:
  167. type: string
  168. format: string
  169. rowFilter.bomid:
  170. name: materialversion
  171. required: false
  172. in: query
  173. schema:
  174. type: string
  175. format: string
  176. rowFilter.bomversion:
  177. name: materialversion
  178. required: false
  179. in: query
  180. schema:
  181. type: string
  182. format: string
  183. rowFilter.node_number:
  184. name: node_number
  185. required: false
  186. in: query
  187. schema:
  188. type: string
  189. format: string
  190. rowFilter.supplierid:
  191. name: node_number
  192. required: false
  193. in: query
  194. schema:
  195. type: string
  196. format: string
  197. rowFilter.legalregulationid:
  198. name: legalregulationid
  199. required: false
  200. in: query
  201. schema:
  202. type: string
  203. format: string
  204. rowFilter.effectiveDate:
  205. name: effectiveDate
  206. required: false
  207. in: query
  208. schema:
  209. type: string
  210. format: date
  211. requestBodies:
  212. material:
  213. content:
  214. application/json:
  215. schema:
  216. type: array
  217. items:
  218. $ref: '#/components/schemas/material'
  219. description: material
  220. material_source:
  221. content:
  222. application/json:
  223. schema:
  224. type: array
  225. items:
  226. $ref: '#/components/schemas/material_source'
  227. description: material_attribute
  228. bom_item:
  229. content:
  230. application/json:
  231. schema:
  232. type: array
  233. items:
  234. $ref: '#/components/schemas/bom_item'
  235. description: bom_item
  236. bom:
  237. content:
  238. application/json:
  239. schema:
  240. type: array
  241. items:
  242. $ref: '#/components/schemas/bom'
  243. description: bom
  244. classification:
  245. content:
  246. application/json:
  247. schema:
  248. type: array
  249. items:
  250. $ref: '#/components/schemas/classification'
  251. description: classification
  252. supplier:
  253. content:
  254. application/json:
  255. schema:
  256. type: array
  257. items:
  258. $ref: '#/components/schemas/supplier'
  259. schemas:
  260. material:
  261. required:
  262. - version
  263. - materialno
  264. - mattype
  265. properties:
  266. materialno:
  267. maxLength: 250
  268. format: character varying
  269. type: string
  270. version:
  271. maxLength: 250
  272. format: character varying
  273. type: string
  274. mattype:
  275. maxLength: 3
  276. type: string
  277. enum:
  278. - 'FG'
  279. - 'CM'
  280. - 'RAW'
  281. - 'INT'
  282. description:
  283. Type of the material
  284. - `FG` - Finished good
  285. - `CM` - finished good from contract manufacturing
  286. - `RAW`- raw material or component
  287. - `INT`- intermediate product
  288. description:
  289. maxLength: 250
  290. format: character varying
  291. type: string
  292. active:
  293. format: boolean
  294. type: boolean
  295. err_flag:
  296. format: bigint
  297. type: integer
  298. cost:
  299. format: real
  300. type: number
  301. description:
  302. 'this is the standard sales price of the article, it is only used for material of mattype = "FG"'
  303. currency:
  304. maxLength: 3
  305. format: character varying
  306. type: string
  307. location:
  308. maxLength: 2
  309. format: character varying
  310. type: string
  311. bomid:
  312. format: string
  313. type: string
  314. description: |-
  315. Note:
  316. This is a Foreign Key to `bom.bomid`.<fk table='bom' column='bomid'/>
  317. custom_attributes:
  318. type: object
  319. additionalProperties: true
  320. type: object
  321. material_source:
  322. required:
  323. - materialno
  324. - supplierid
  325. properties:
  326. materialno:
  327. format: string
  328. type: string
  329. description: >-
  330. Note:
  331. This is a Foreign Key to `material.materialno`.<fk table='material'
  332. column='mateiralno'/>
  333. supplierid:
  334. format: string
  335. type: string
  336. description: >-
  337. Note:
  338. This is a Foreign Key to `supplier.supplierid`.<fk table='supplier'
  339. column='mateiralno'/>
  340. iso2:
  341. maxLength: 2
  342. format: string
  343. type: string
  344. cost:
  345. format: real
  346. type: number
  347. currency:
  348. maxLength: 3
  349. format: string
  350. type: string
  351. suppliermatno:
  352. format: string
  353. type: string
  354. active:
  355. format: boolean
  356. type: boolean
  357. type: object
  358. bom:
  359. required:
  360. - bomid
  361. properties:
  362. bomid:
  363. format: string
  364. type: string
  365. description: |-
  366. Note:
  367. This is a Primary Key.<pk/>
  368. version:
  369. maxLength: 250
  370. format: character varying
  371. type: string
  372. err_flag:
  373. format: bigint
  374. type: integer
  375. is_qty_relative:
  376. format: boolean
  377. type: boolean
  378. stop_explosion:
  379. format: boolean
  380. type: boolean
  381. bom_items:
  382. type: array
  383. items:
  384. $ref: '#/components/schemas/bom_item'
  385. type: object
  386. bom_item:
  387. required:
  388. - node_number
  389. - bomid
  390. - materialno
  391. properties:
  392. node_number:
  393. maxLength: 250
  394. format: character varying
  395. type: string
  396. bomid:
  397. format: string
  398. type: string
  399. description: |-
  400. Note:
  401. This is a Foreign Key to `bom.bomid`.<fk table='bom' column='id'/>
  402. materialno:
  403. format: bigint
  404. type: integer
  405. description: >-
  406. Note:
  407. This is a Foreign Key to `material.materialno`.<fk table='material'
  408. column='id'/>
  409. version:
  410. maxLength: 250
  411. format: character varying
  412. type: string
  413. err_flag:
  414. format: bigint
  415. type: integer
  416. ignore:
  417. format: boolean
  418. type: boolean
  419. quantity_per:
  420. format: real
  421. type: number
  422. type: object
  423. classification:
  424. required:
  425. - materialno
  426. - legal_reg_id
  427. properties:
  428. materialno:
  429. format: string
  430. type: string
  431. description: >-
  432. Note:
  433. This is a Foreign Key to `material.materialno`.<fk table='material'
  434. column='materialno'/>
  435. legal_reg_id:
  436. format: bigint
  437. type: integer
  438. description: >-
  439. Note:
  440. This is a Foreign Key to `legal_regulation.id`.<fk
  441. table='legal_regulation' column='id'/>
  442. code:
  443. maxLength: 250
  444. format: character varying
  445. type: string
  446. code_status:
  447. maxLength: 255
  448. format: character varying
  449. type: string
  450. auto_code:
  451. maxLength: 250
  452. format: character varying
  453. type: string
  454. new_code_compare:
  455. format: bigint
  456. type: integer
  457. auto_code_status:
  458. maxLength: 255
  459. format: character varying
  460. type: string
  461. status:
  462. maxLength: 250
  463. format: character varying
  464. type: string
  465. supplier_code:
  466. maxLength: 250
  467. format: character varying
  468. type: string
  469. units:
  470. maxLength: 250
  471. format: character varying
  472. type: string
  473. valid_from:
  474. format: date
  475. type: string
  476. valid_to:
  477. format: date
  478. type: string
  479. custom_attributes:
  480. type: object
  481. additionalProperties: true
  482. type: object
  483. supplier:
  484. required:
  485. - supplierid
  486. properties:
  487. supplierid:
  488. format: string
  489. type: string
  490. description: |-
  491. Note:
  492. This is a Primary Key.<pk/>
  493. name:
  494. format: string
  495. type: string
  496. contact:
  497. format: string
  498. type: string
  499. contactemail:
  500. format: string
  501. type: string
  502. phone:
  503. format: sting
  504. type: string
  505. post_response:
  506. properties:
  507. objectsAdded:
  508. format: int
  509. type: integer
  510. objectsRejected:
  511. format: int
  512. type: integer
  513. patch_response:
  514. properties:
  515. objectUpated:
  516. format: int
  517. type: integer
  518. objectUpdatedRejected:
  519. format: int
  520. type: integer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement