3pl/partnerapi/shiip/const.go

55 lines
1.4 KiB
Go
Raw Normal View History

2022-12-01 04:18:07 +00:00
package shiip
const (
TimeLayout = "2006-01-02 15:04:05"
apiPathCreateOutboundRequest = "/v1/api/external/vietful/outbound/requests"
apiPathGetOutboundRequest = "/v1/api/external/vietful/outbound/requests/%d"
apiPathCancelOutboundRequest = "/v1/api/external/outbound/requests/%d/cancel"
apiPathUpdateLogisticInfoOutboundRequest = "/v1/api/external/outbound/requests/%d/logistic-info"
apiPathAuth = "/v1/api/external/vietful/auth/access-token"
PriorityUrgent = 3
PriorityHigh = 2
PriorityNormal = 1
TPLCodeGHN = "GHN"
TPLCodeGHTK = "GHTK"
TPLCodeBest = "BEST"
TPLCodeSnappy = "SPY"
TPLCodeViettelPost = "VTP"
TPLCodeSellyExpress = "SE"
TPLCodeJTExpress = "JTE"
ShippingServiceCodeSTD = "STD"
ORTypeOrder = 1
ShippingTypeSelfShip = 1
PackTypeNormal = 1
BizTypeB2C = 1
ConditionTypeCodeNew = "NEW"
)
const (
baseURLAuthStaging = "https://api.shiip.vn"
baseURLStaging = "https://api.shiip.vn"
// TODO: add base URL
baseURLAuthProd = ""
baseURLProd = ""
)
const (
ErrCodeExistPartnerCode = "exist_partner_code"
)
var (
baseURLENVMapping = map[ENV]string{
EnvProd: baseURLProd,
EnvStaging: baseURLStaging,
}
baseURLAuthENVMapping = map[ENV]string{
EnvProd: baseURLAuthProd,
EnvStaging: baseURLAuthStaging,
}
)