0.0.51 • Published 3 years ago

@one-view/pd-oneview-order-modification-types v0.0.51

Weekly downloads
169
License
-
Repository
-
Last release
3 years ago

FORMAT: 1A HOST: https://api.pd-oneview.net/order-modification

pd-oneview-order-modification

Oneview backend for order modification and refund

Cancel Order /v1/orders/{orderCode}/cancel{?geid}

  • Parameters
    • orderCode (required, string, vsba-nhas)
    • geid: FP_SG (string, optional) - global entity id

cancel order POST

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Attributes (CancelOrderParams)

  • Response 200 (application/json)

    • Attributes (CancelResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 401 (application/json)

    • Attributes (Error)
  • Response 403 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Refund /v1/orders/{orderCode}/refund{?geid}

  • Parameters

    • orderCode (required, string, vsba-nhas)
    • geid: FP_SG (GlobalEntityId, optional) - global entity id
  • Attributes (RefundResponse)

refund POST

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Attributes (RefundParams)

  • Response 200 (application/json)

    • Attributes (RefundResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 401 (application/json)

    • Attributes (Error)
  • Response 403 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 429 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Compensation Value /v1/orders/{orderCode}/compensation{?geid,ccr}

  • Parameters
    • orderCode (required, string, vsba-nhas)
    • geid: FP_SG (GlobalEntityId, optional) - global entity id
    • ccr: 2A.1 (string, required) - ccr Code

get compensation value GET

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Response 200 (application/json)

    • Attributes (CompensationValueResponse)
  • Response 400 (application/json)

  • Response 404 (application/json)

  • Response 500 (application/json)

    • Attributes (Error)

create compensation POST

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Attributes (CreateCompensationParams)

  • Response 200 (application/json)

    • Attributes (CreateCompensationResponse)
  • Response 400 (application/json)

  • Response 404 (application/json)

  • Response 429 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Get Compensation Eligibility /v1/orders/{orderCode}/check-compensation{?geid,ccr,nocache}

  • Parameters

    • orderCode (required, string, vsba-nhas)
    • geid: FP_SG (string, required) - global entity id
    • ccr: 2A.1 (string, required) - ccr Code
    • nocache (boolean, optional) - nocache parameter
  • Attributes (CheckCompensationResponse)

get value GET

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Response 200 (application/json)

    • Attributes (CheckCompensationResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Get Refund Mapping /v1/refund/mapping{?geid}

  • Parameters
    • geid: FP_SG (string, required) - global entity id

get value GET

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Response 200 (application/json)

    • Attributes (RefundMappingResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Get Credit Payment Type Validation /v1/refund/credit/validate{?geid,paymentType}

  • Parameters
    • geid: FP_SG (string, required) - global entity id
    • paymentType: credit card (string, required) - payment type to be validated

get value GET

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Response 200 (application/json)

    • Attributes (CreditRefundValidationResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

item removal vendor blacklist /v1/vendors/item-removal-blacklist

create vendor blacklist POST

  • Request

    • Headers

        Authorization: bearer token
  • Attributes (VendorBlacklistOpsRequest)

  • Response 201 (application/json)

    • Attributes (VendorBlacklistOpsResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

delete vendor blacklist DELETE

  • Request

    • Headers

        Authorization: bearer token
  • Attributes (VendorBlacklistOpsRequest)

  • Response 200 (application/json)

    • Attributes (VendorBlacklistOpsResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Data Structures

int32 (number)

int64 (number)

error_object (object)

  • status (string)
  • title (string)
  • code (string)

Error (object)

CancelOrderParams

  • reason (string, required) - Reason for requesting an order cancellation
  • paymentType (string, required) - payment type that customer has used to create an order
  • compensationFee (number, required) - amount to be compensated
  • orderAmount (number, optional) - amount order to be refunded
  • refundType (RefundType, optional) - refund type will be use if paymentType is not cash_on_delivery (following partial refund flow)
  • creditSource (CreditSource, optional) - type of CreditSource that customer want to use to refund their order
  • accountDetail (string, optional) - account detail of credit source
  • missingItems (arraystring, optional, fixed-type) - become required when refundType is cash_on_delivery

CancelResponse

  • data
    • voucherCode (string, optional) - voucher code
    • refundId (string, optional) - refund ticket id

RefundResponse

  • data (RefundData, required) - refund response

RefundData

  • refund
    • id (string, optional) - refund ticket id
    • voucherCode (string, optional) - voucher code
  • missingItems
    • id (string, required) - missing items id

RefundParams

  • refundType (RefundType, required) - refund type
  • orderAmount (number, required) - amount of refund
  • compensationFee (number, required) - amount to be compensated
  • creditSource (CreditSource, optional) - source of credit
  • accountDetail (string, optional) - account detail of credit source
  • vendorName : jolibee (string, required) - vendor name
  • vendorID : vsba-nhas (string, required) - vendor id
  • agentName : julie (string, required) - reporting agent name
  • missingItems (arraystring, fixed-type, required) - list of missing items
  • paymentType (string, optional) - payment type that customer has used to create an order; required if refundType is credit
  • removedItems (arrayMissingItem, fixed-type, required) - list of missing items

RefundParamsV2

  • refundType (RefundType, required) - refund type
  • orderAmount (number, required) - amount of refund
  • compensationFee (number, required) - amount to be compensated
  • creditSource (CreditSource, optional) - source of credit
  • accountDetail (string, optional) - account detail of credit source
  • vendorName : jolibee (string, required) - vendor name
  • vendorID : vsba-nhas (string, required) - vendor id
  • agentName : julie (string, required) - reporting agent name
  • paymentType (string, optional) - payment type that customer has used to create an order; required if refundType is credit
  • missingItems (arrayMissingItem, fixed-type, required) - list of missing items
  • otherMissingItems (string, optional) - other missing items note

MissingItem

  • id (string, required) - item id
  • lineItemID (string, required) - line item id
  • name (string, required) - item name
  • quantity (int32, required) - quantity of item
  • toppings (arrayMissingToppings, fixed-type, optional) - list of item toppings ids
  • unitPrice (number) - unit price of item
  • parentProductID (string) - The ID of parent product of the item

MissingToppings

  • id (string, required) - topping id
  • name (string) - topping name
  • quantity (int32) - quantity of item
  • unitPrice (number) - unit price of item

CreateCompensationParams

  • ticketId (string, required) - ticket id to be referenced
  • amount (number, required) - total amount of compensation will be issued

CreateCompensationResponse

  • voucherCode (string, required) - voucher code that has been issued

CancelReason (enum)

  • ORDER_MODIFICATION_NOT_POSSIBLE
  • MISTAKE_ERROR
  • DUPLICATE_ORDER
  • LATE_DELIVERY
  • UNABLE_TO_FIND
  • FOOD_QUALITY_SPILLAGE
  • NEVER_DELIVERED
  • WRONG_ORDER_ITEMS_DELIVERED
  • VOUCHER_NOT_APPLIED
  • DELIVERY_ETA_TOO_LONG

CreditSource (enum)

  • online_payment
  • online_banking
  • cash_on_delivery
  • paypal
  • apple_pay
  • gcash
  • paylah

RefundType (enum)

  • voucher
  • credit
  • wallet
  • payment source

CommentType (enum)

  • automatic
  • manual

RefundWidgetValueResponse

  • data (CompensationValue, required) - compensation value response

CompensationValueResponse

  • data (CompensationValue, required) - compensation value response

CompensationValue

  • value (number, required) - value of compensation
  • default (number) - default value of compensation
  • maxValue (number) - max value of compensation
  • minValue (number) - minimum value of compensation
  • granularity (number) - granularity of compensation value
  • isEditable (boolean) - whether value editable or not
  • isFallbackValue (boolean) - whether value is a fallback or not
  • ccrTranslation (string) - translation of the given CCR

CheckCompensationResponse

  • eligible (boolean, required) - is order eligible for compensation
  • reason (string) - reason of eligibility status

RefundMappingResponse

RefundCalculationResponse

RefundCalculation

  • geid : FP_SG (string, required) - global entity ID
  • minimumValue : 4 (number, required) - minimum refund value
  • granularity : 0.5 (number, required) - granularity of refund value
  • compensation : 0.10 (number, required) - compensation value

CreditRefundValidationResponse

  • pspValid (boolean, required) - is payment type valid

VendorBlacklistOpsRequest

  • geid : FP_SG (string, required) - global entity ID
  • code : vsba-nhas (string, required) - vendor code, will be used for item removal logic as object identity
  • name : jolibee (string) - vendor name
  • globalID : 33dsafa (string) - vendor global id
  • id : 123421 (string) - vendor id
  • verticalType : restaurant (string) - vendor vertical type

VendorBlacklistOpsResponse

  • success : true (string) - status of the operation
0.0.51

3 years ago

0.0.50

3 years ago

0.0.49

3 years ago

0.0.48

3 years ago

0.0.46

3 years ago

0.0.47

3 years ago

0.0.43

3 years ago

0.0.44

3 years ago

0.0.45

3 years ago

0.0.40

3 years ago

0.0.41

3 years ago

0.0.42

3 years ago

0.0.37

3 years ago

0.0.38

3 years ago

0.0.39

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.35

3 years ago

0.0.36

3 years ago

0.0.31

3 years ago

0.0.30

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.25

4 years ago

0.0.26

4 years ago

0.0.22

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.20

4 years ago

0.0.21

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago